- Home /
Passing variables throught scene
Hi- I am trying to do a multiplayer game. Very easy. People pick from a list 0 1 2 3. Who pick the greater number win. I did a menu to enter player name. To pass it throught the scene I did: A script attached to a button that store the input text in a variables. Then I create an empty game object and I store the name in a script attached to that gameobject. I did void awake() dontdestroyonload. I change scene and then I try to find for that gameobject. The problem is that unity change the name of my gameobject to the name of stored in the script attacched to it...
Your answer
![](https://koobas.hobune.stream/wayback/20220612160631im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Referencing a gameobject in another scene 1 Answer
Load Scene Bug 0 Answers
Same script not working on next level 0 Answers
My life counter is not updating 1 Answer
Moving a inspector slider to add objects to the scene 1 Answer