- Home /
Calling a scene with a variable
i have mainmenu. player enters the name of the character in the menu. and i call the game with the playername.
i mean transfering the variables :)
please don't suggest PlayerPrefs (this is a multiplayer game. there is a hack way)
Comment
Best Answer
Answer by Mortennobel · Jul 01, 2011 at 02:52 PM
Put the variables in a GameObject and mark it as 'dontdestroyonload'
See more here:
http://instantiateunity.blogspot.com/2011/06/dont-destroy-on-load.html http://unity3d.com/support/documentation/ScriptReference/Object.DontDestroyOnLoad.html
Your answer
Follow this Question
Related Questions
Load Custom Scene 2 Answers
How to use same code at multiple scenes ? 1 Answer
Where is the Mistake in my Coin System? 1 Answer
Setting variable as type "Scene" 4 Answers
How to call Variable across scripts. 2 Answers