- Home /
Call method after loading scene?
Hi I'm trying to figure out how I would go about calling a method after loading a new level or reloading the same level. I need to reload a scene and call a loadgame method for a level-refresh system to go in hand with my game saving/loading system, but reloading a scene seems to cancel the command in script?
Answer by Eno-Khaon · Apr 26, 2015 at 06:54 PM
If you're looking to have a game-wide controller to handle loading and saving through scene changes, you could look into DontDestroyOnLoad to preserve that controller between scenes.
I do have an object with this function, but it doesn't seem to load information from the save file after the level loads, is there some way to wait for the level to fully load before loading the save file information?
Do you think it's because I put it in a Static $$anonymous$$ethod? This may be the source of my problem. I'm going to test out a non-static method and see if that works.