Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Change what scene the game launches in based on variable?

Discussion in 'Editor & General Support' started by Kristen182, Jul 26, 2019.

  1. Kristen182

    Kristen182

    Joined:
    Aug 10, 2018
    Posts:
    42
    I'm not sure if this is possible but I thought I'd ask here. Basically, I want to be able to launch a different scene when the game opens if the player has never played before. I'm not sure that this is possible because player prefs wouldn't be loaded until a scene launches, and the initial scene is based on build settings. I am currently building for Android if that matters. Can anyone think of a way to change the scene the game launches in based on a variable?
     
  2. Solution: build a very small scene, the only purpose of this is to load all the things ahead of time and decide which other scene to load. Basically a loader-scene. The platform does not matter, just make sure this "empty" scene is the very first in the build settings.
     
    Joe-Censored likes this.
  3. Kristen182

    Kristen182

    Joined:
    Aug 10, 2018
    Posts:
    42
    That worked great, thank you very much!