- Home /
Question by
Gcbs · Feb 15, 2019 at 02:21 PM ·
playerobjectscene-switching
How to "transport" a gameobject when switching scenes?
I'd like to know if there's a way of taking the player object when switching scenes, I mean, if we go from scene 0 (where the player object is) to scene 1, how to make the player also switch to this? Or the only way is to create a new object in this scene?
Comment
Answer by Defetysta · Feb 15, 2019 at 02:32 PM
Sounds like what you are looking for is DontDestroyOnLoad()
Here you can have some more info about that:
https://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html
Your answer
Follow this Question
Related Questions
How to Change a character?? 1 Answer
Changing player object UNET 1 Answer
How to setActive an Object form another scene? Help please. 2 Answers