I don’t think it’s possible with unity, but I’d like my little tutorial to show once on the first play, & never show again when the player plays the game for the second time & so on.
Basically in start function PlayerPref.SetInt ("TutorialHasPlayed", 0);
Then for your tutorial start put if (PlayerPref.GetInt ("TutorialHasPlayed", 0) <= 0) {//--start tutorial--//; PlayerPref.SetInt ("TutorialHasPlayed", 1); }
. This will set the playerpref int with 0 as false and 1 as true. Once the tutorial plays It will set the int to 1 as true and it will no longer play on that device.
If(PlayerPrefs.GetInt(“FirstTime”) == 0)
{
//Load tutorial
}
else
{
//load something different
}
Just do PlayerPrefs.SetInt(“FirstTime”,1) when the player finishes the tutorial.
you can make your tutorials dependant on a bool, that after first play gets set to false. you could store it in playerprefs, and even make it a setting in a menu.
using System;
using UnityEngine;
using UnityEngine.SceneManagement;
public class GameLaunchCounter : MonoBehaviour
{
string SessionNumber = PlayerPrefs.GetString("unity.player_session_count");
private void Start()
{
if (SessionNumber == "0")
{
SceneManager.LoadScene("Tutorial");
else
{
SceneManager.LoadScene("SomethingElse")
}
}
}
}