Browse Source

Add nested Save Menu error message

master
Jorge Ramirez 7 years ago
parent
commit
834a4c44a3
  1. 9
      Assets/Fungus/Scripts/Components/SaveMenu.cs

9
Assets/Fungus/Scripts/Components/SaveMenu.cs

@ -71,7 +71,14 @@ namespace Fungus
instance = this; instance = this;
GameObject.DontDestroyOnLoad(this); if (transform.parent == null)
{
GameObject.DontDestroyOnLoad(this);
}
else
{
Debug.LogError("Save Menu cannot be preserved across scene loads if it is a child of another GameObject.");
}
clickAudioSource = GetComponent<AudioSource>(); clickAudioSource = GetComponent<AudioSource>();
} }

Loading…
Cancel
Save