OK This is beyond stupid… this was all working just fine… I NEVER CHANGED ANYTHING!!
This is just something new that decided to happen out of the blue!!
It’s set to load scene 2 although that’s wrong it should be scene 3, but yet in the editor it does load the correct scene WTF?? right??
I do a standalone build and it does not load the next scene. You can see by my attachment how I have my scenes set up… has anyone had this happen before…??
Like I say I never changed anything this just suddenly decided to start happening!!
![using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class LogoMovie : MonoBehaviour {
public MovieTexture movTexture;
public RawImage myLogoMovie;
public AudioClip KittID;
public AudioClip LogoOutFX;
float volume = 0.3f; //Clip Volume Setting
public Text inputFieldPilotName;
private int devSt12; //K.I.T.T. Main Intro Screen Toggle On / Off
//public bool KITTID_On_Off = false; //Toggle for KITT to play ID on or off bool set to true by default.
//Setable by Player Prefs from ConFig Screen
public string mainIntroScrnTime; //Set time for duration of main intro screen to remain before transition to main screen.
//Setable by Player Prefs from ConFig Screen
void Start() {
GetComponent<RawImage>().texture = movTexture as MovieTexture;
movTexture.Play();
movTexture.loop = true;
inputFieldPilotName = GameObject.Find("TextPilotName").GetComponent<Text>();
inputFieldPilotName.text = PlayerPrefs.GetString("PilotName");
devSt12 = PlayerPrefs.GetInt ("toggleKITTintro"); //Determins if Intro will play based on setting in Con Fig Screen.
mainIntroScrnTime = PlayerPrefs.GetString ("loadScreenTime"); //Wait Time As Set By Con Fig Screen.
StartCoroutine(Fade("MainScreen"));
}
IEnumerator Fade(string level02)
{
if (devSt12 == 1) {
yield return new WaitForSeconds (float.Parse(mainIntroScrnTime));
Debug.Log ("I Am Waiting For Player Pref Time");
GetComponent<AudioSource> ().PlayOneShot (KittID);
Debug.Log ("I Will Play KITT Intro Because I am Set to True");
//Load Main After Time
yield return new WaitForSeconds (9.0f);
myLogoMovie.CrossFadeAlpha (0, 1.0f, false);
GetComponent<AudioSource> ().PlayOneShot (LogoOutFX, volume);
yield return new WaitForSeconds (0.9f);
SceneManager.LoadSceneAsync (level02);
} else {
if (mainIntroScrnTime != null && mainIntroScrnTime != "")
{
yield return new WaitForSeconds(float.Parse(mainIntroScrnTime));
Debug.Log("I Am Waiting For Player Pref Time");
myLogoMovie.CrossFadeAlpha(0, 1.0f, false);
GetComponent<AudioSource>().PlayOneShot(LogoOutFX, volume);
yield return new WaitForSeconds(0.9f);
}
else {
yield return new WaitForSeconds(3.0f); // DEFAULT WAIT TIME
}
SceneManager.LoadSceneAsync(level02);
}
}
}][1]