- Home /
Question by
GuardiaN95 · Nov 26, 2014 at 05:48 PM ·
scenescene-loadingscene-changegame-scene
Game Optimization, Scene changing
Hello! I am making a game, big project with a lot of levels, effects and scripts. I have a question about optimization. I made a first scene of a game, and it contains GUI elements. My question is, how can I access these from another scene, because I don't want to import them in every scene I make, but I need to access them while another scene is loaded...
Comment
Best Answer
Answer by Landern · Nov 26, 2014 at 05:51 PM
Make your menu system work off a GameObject, use DontDestroyOnLoad and load the level with Application.LoadLevelAsync.
DontDestroyOnLoad will keep unity from removing the GameObject, LoadLevelAsync will allow you to load the level in the background while keeping the main application responsive.