void Awake() { // there should only be one of this on the scene. if (main == null) { main = this; } else { Debug.LogWarning("There are more than one WordScramble class on this scene. Remove one of them."); } }
private void OnDestroy() { main = null; }