- Home /
How to define Frist Start-up (Launch) in script?
So i basically wanted to create tutorial of how to contol the game.. but i want it to be shown only at first start-up.. Can someone define this in script? It would be helpful for me. Thanks
Comment
Answer by GothSeiDank · Oct 31, 2017 at 09:15 PM
class Tutorial
{
public bool isFirstStart { get; set; }
void Start()
{
if (PlayerPrefs.HasKey("isFirstStart"){
isFirstStart = PlayerPrefs.GetKey("isFIrstStart");
}
}
void TutorialDone()
{
PlayerPrefs.SaveKey("isFirstStart", isFirstStart();
}
}
Something along those lines should help. A simple saved value can help with that. Of course, you can also save it to a file, PlayerPrefs saves to the registry by default on Windows.
I hope it works.. but i can't try it now.. so i will write you tommorow. Thanks
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
How to make a slider menu 1 Answer
How to make custom UI controls/components using C#? 1 Answer