- Home /
Does unity have a feature that lets you change something in one scene from a completely different scene?
I want to create a main menu(scene 0), a settings menu(scene 1), and a main game(scene 2). In the settings menu I want to be able to choose new backgrounds to be behind the game, can somebody please tell me how I would do that if it is even possible? P.S. If you could show me in javascript that would be awesome, thanks.
Answer by getyour411 · Feb 07, 2014 at 11:12 PM
Yes, you want to read on DontDestroyOnLoad. Say for example in scene 1 you have a GObj that is flagged for DontDestroy and based on user input you set var backgd = myCoolBackGround; on that GObj/script.
When you get the scene 2, you have the reference/variable, use it however you'd like.
Your answer
Follow this Question
Related Questions
Paused Menu backdrop 1 Answer
Editor scene preview window 0 Answers
Main Menu with different scenes appearing on background ?! 1 Answer
Load/Save script 0 Answers
Best Way to handle different Menu BG images (Using UIToolKit) 0 Answers