Quantcast
Channel: Questions in topic: "dontdestroyonload"
Viewing all articles
Browse latest Browse all 416

DontDestroyOnLoad doesnt work ouside editor

$
0
0
In my game, I have a game manager. I need this to persist between loading stages. When I hit the play button from the editor, it works fine. I navigate from the start menu to the character select menu and I can select my character. When I build, I can't use the character select button because of a null reference error exception. This same code works fine when I just hit the play button from the editor. if (gm.gameMode.Equals("Single")) gm - is the name of the object that was supposed to persist on each level.

Viewing all articles
Browse latest Browse all 416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>