- Home /
DontDestroyOnLoad object
How can I load all object in this function into new scene for using (ex :current player's stat ,current player's Inventory (item , gear) , mainCamera, ... ) without callback in new scene ? I just add tag for GameObject that contain all of those() and load into new scene. It's working but when pick up new item , the Item can't contain in my inventory....
Answer by imran-arif011 · Oct 22, 2018 at 02:20 PM
Make a GameObject that contains DontDestroyOnLoad method and Make all other gameObjects child of this GameObject. This way you won't lose any of the child GameObject when Changing the scene.
Your answer
Follow this Question
Related Questions
GameObjects turn invisible when i teleport the Player's transform to a respawn point. 0 Answers
How to Access GameObject.collider.cente in #pragma strict 1 Answer
Should I get checked out? 0 Answers
Mic recording with AR foundation causes app to freeze. Need help please 1 Answer
Sign In error with Unity Hub 0 Answers