public static GameLevelControl Instance() { if (!gamelc) { gamelc = FindObjectOfType(typeof(GameLevelControl)) as GameLevelControl; if (!gamelc) // Make sure that Modalpanel existes. { Debug.Log("There needs to be one active GameLevelControl Script on a GameObject in your scene"); } } return(gamelc); }
void Awake() { gamelc = GameLevelControl.Instance(); }