Load different Scene on first load

Hello everyone! I have got two different scenes: “Normal” scene and “FirstStart” scene. I want to load “FirstStart” on first game startup and “Normal” on every after. (Sorry for english)

Hey @Mpl2014,
You dont have to create any text files to check whether or not your app is starting the first time.
Just use PlayerPrefs for this and a third scene in which you check stuff like that. This third scene has to be the very first scene in the scene load order inside your build settings.
Then you could write something like this and put it inside that start scene.

Assuming you have a scene_01 and scene_02 and a start_scene:

using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;

public class StartScene : MonoBehaviour
{

    // Use this for initialization
    void Start()
    {
        if(PlayerPrefs.GetInt("FirstLaunch") == 0)
        {
            //First launch
            PlayerPrefs.SetInt("FirstLaunch", 1);
            SceneManager.LoadScene("scene_01");
        }
        else
        {
            //Load scene_02 if its not the first launch
            SceneManager.LoadScene("scene_02");
        }
    }

}

would be the script to put into the start_scene.

You need a scene before those two. In this scene you check for the existence of a file (maybe a save file). If it exists, you proceed with the “Normal” scene. If it not exists, you create it and load the “First start” scene.

Go to file, build Settings, then drag FirstScene to the top.

Or attack this C# script to a empty object or something

void Start() {
     Application.LoadLevel("FirstScene");
}

I’m not home so I don’t remember if it’s with or without Quotation marks

If somebody have same question here is answer:

    import System;
    import System.IO;
     
    var  fileName = "MyFile.txt";
     
    function Start()
    {
            if (File.Exists(fileName))
            {
                Application.LoadLevel("YourLevel2");
                Debug.Log(fileName+" already exists.");
                return;
            }
           Application.LoadLevel("YourLevel");
            var sr = File.CreateText(fileName);
            sr.WriteLine ("Your SaveFile Text");
            sr.WriteLine ("You Can write ewerything",
                1, 4.2);
            sr.Close();
    }