- Home /
how to save prefab that indicates if the scene should be played or not?
i want to make a game tutorial scene that carry game playing tutorial with slides, now when user install this game on device for first time then this scene will show first and after that, that never show, how can i make this?
Answer by MD_Reptile · Dec 15, 2015 at 10:05 PM
For that type of thing you can get away with using playerprefs to keep track of whether or not they have seen the "tutorial" or not. What you could do is, when the game loads, have it check if a playerpref exists saying its already been seen, like this (probably in Start() method of some script in the first scene that loads):
if (PlayerPrefs.GetInt("SeenTutorial") == 1) // we have seen the tutorial before
Application.LoadLevel("MainGameScene");
else
Application.LoadLevel("TutorialScene")
And when a player does the tutorial, we need to tell future launches that its been seen like this (possibly when the tutorial scene first starts, in some Start() method):
PlayerPrefs.SetInt("SeenTutorial", 1); // we will know we have seen the tutorial
Good luck!
Still i not get it how to do this and where to keep this code in which script. and what we called this effect?
Your answer
Follow this Question
Related Questions
How do I make a coroutine from another script stop? 3 Answers
Change Resolution Scaling Mode by script (Android) (SOLVED FOR ME) 2 Answers
Endless runner spawning infinite tiles 0 Answers
Creating one class or using polymorphism? 1 Answer
How do I make the enemy script/AI stop following me when It is in view of the player camera? 1 Answer