Question by
magicdog2013gamez · Apr 30, 2020 at 01:34 AM ·
c#fpsunityeditorsystem.io
Change starting scene based on file
I'm using a simple save load thing, Upon an event a file is moved to the Saves folder, before adding application.persistentDataPath it worked fine in game but not in the build after it doesn't work on either, The scene should start and detect if a file exists, if not it will not run anything and if it does exist it will run the scene. so any idea whats wrong with it?
IEnumerator Start () { Start: if (System.IO.File.Exists (Application.persistentDataPath + "Assets/Char/original")) { SceneManager.LoadScene (72); } else { yield return new WaitForSeconds(2); goto Start; } } }
Comment