- Home /
Float From Scene1 to Scene2
I have been struggling with this problem for few days. I have two different scenes, one for main menu and one for actual game. In main menu you have options where you can change game scene values to make game easier/harder. Main menu is coded in C# and game in JavaScript. Problem is that i cant transfer that float from mainmenu to game.
There is picture of scenes. I should access Menu scene gameobject component, but it throws me error BCE0019: 'speed' is not a member of 'UnityEngine.Component'. I hope you understand my problem and know how to help in it.
Answer by Landern · Sep 07, 2014 at 12:10 PM
You can save your setting with PlayerPrefs(or any other type of storage scheme(SQLite, XML, Json... though more experience would be required) or use DontDestroyOnLoad to mark the object not to be destroyed between scene loads.
Your answer
![](https://koobas.hobune.stream/wayback/20220613162505im_/https://answers.unity.com/themes/thub/images/avi.jpg)