Opposite of DontDestroyOnLoad?

I have an instructions GuiTexture showing when a level starts and when clicked it disappears so the player may begin the level. My issue is when the player dies and restarts the level, that same GuiTexture pops up again every time. Is there an easy way to have it only appear once and then not reload when the level reloads?

Many thanks for help in advance

Why not make a manager class / object that lives between level loads with DontDestroyOnLoad.
In that Class you can save if the introduction was shown before and delete it / not show it in the first place.

2 Likes

That sounds like what I need but how do I write the if statement in the manager class?

Some other approaches that come to mind

  • Store the presence of the UI in playerprefs
  • Use a preloader, load everything that needs to be seen only once there. Then once its destroyed it won’t get reloaded.
1 Like
private bool showIntroduction = true;

...

if(showIntroduction)
{ 
<...intro stuff...>
showIntroduction != showIntroduction;
}
1 Like

Thank you very much :slight_smile:

Thanks for your help, Ill try the preloaded option. I don’t know what it is yet but it gives me something to go by.