When I return to may main scene the animation is missing, when I go back to the Scene where the animation originated it is also missing.
The Script has the Don't destroy code on it.
public class UIManagerScript : MonoBehaviour {
public Animator LEDlights;
public static UIManagerScript uiManagerScr;
void Awake () {
if (uiManagerScr == null) {
DontDestroyOnLoad (gameObject);
uiManagerScr = this;
} else if (uiManagerScr != this) {
Destroy (gameObject);
}
}
public void PlayLEDLightsAnimation()
{
GetComponent ();
LEDlights.SetBool ("notPlaying", !LEDlights.GetBool ("notPlaying"));
}
public void GoSurveillanceModeToggle(){
//Send to Sending script for message out to Arduino
Sending.sendBlue ();
}
public void TogglePlay()
{
if (GetComponent ().isPlaying)
{
GetComponent().Stop();
}
else
{
GetComponent().Play();
}
}
//Quit Button
public void GoQuit(){
StartCoroutine(LoadQuit("ThreeD_Overview"));
}
IEnumerator LoadQuit(string levelMain){
yield return new WaitForSeconds(0.5f); // wait time
Application.LoadLevel(levelMain);
}
}
![Scene Where Animation first starts][1]
![Scene One][2]
[1]: /storage/temp/59255-screen-shot-2015-12-03-at-74746-am.jpg
[2]: /storage/temp/59257-screen-shot-2015-12-03-at-74813-am.jpg
↧