///////////////// // Constructor // ///////////////// void Awake() { if (Smanager != null && Smanager != this) { Destroy(this.gameObject); } else { Smanager = this; } }
// Use this for initialization void Start() { instance = GetComponent <SurpriseManager>(); //required for singleton with instance in scene }