- Home /
Question by
EliasTheCreeper · Apr 01, 2020 at 09:19 AM ·
scripting problemscenedontdestroyonload
How do I transfer a gameobject created in one scene to another scene AND use it in a c# script?
I want to use a GameObject I have created in my first scene in a script of an object in another scene, at the moment I transfer the object using the function dontdestroyonload. Can someone help me with this problem, I did not find anything online.
Comment
Answer by bzone_mx · Apr 01, 2020 at 10:58 AM
Create a prefab of the object, instantiate when needed or simply drag the prefab into the scene.
Your answer
Follow this Question
Related Questions
How to stop objects you picked up from reappearing when you go to another level and return 1 Answer
Failed to unpersist: MonoBehaviour ID and then unity destroys our scene. 3 Answers
How do you deactivate a static script until a certain key is pressed? 2 Answers
Dont Destroy On Load - Exception 2 Answers