|
Post by Outman on Sept 4, 2017 22:34:54 GMT
Hi
I'm making a game in which tasks the player with getting from point A to point B. Once the player has gotten to point B the game then goes back to the level selection screen. The problem that i'm having is that the player moves to the level select screen as well, causing some issues. I get that this has to do with the don't destroy on load being called i just don't know where or how to disable it. Also, if there were to be a situation where i wanted the player to not continue to exist on loading due to triggering a non gameplay scene like the main menu or a level selection screen, but when loading a any gameplay scene it resumes the players stats such as inventory and heath how would i go about doing that if possible? Thanks.
|
|
|
Post by shadex on Sept 11, 2017 21:11:03 GMT
Hi I'm making a game in which tasks the player with getting from point A to point B. Once the player has gotten to point B the game then goes back to the level selection screen. The problem that i'm having is that the player moves to the level select screen as well, causing some issues. I get that this has to do with the don't destroy on load being called i just don't know where or how to disable it. Also, if there were to be a situation where i wanted the player to not continue to exist on loading due to triggering a non gameplay scene like the main menu or a level selection screen, but when loading a any gameplay scene it resumes the players stats such as inventory and heath how would i go about doing that if possible? Thanks. I am a bit confused with the question. I think you might be doing it wrong though. the Scene selection / Main Menu screen should be the first scene, then you want a menu screen in game as well, that way persistance isn't an problem. You really don't want to load a menu screen each time the player pauses, or wants to change some options, because then you have to reload the entire scene that you where just at. If for some reason you do need it to work like that, then you need to save everything you want to save either with your own custom system or something like easysave on the asset store, then reload the save each time you switch back similar to emulator's save state systems like snes9x. If your gave is 3d though, the load times while kill you.
|
|