private void Awake() { if (m_instance == null) { m_instance = this; } else if (m_instance != this) { Debug.LogWarning("IGMenu.Awake() - instance already exists!"); Destroy(gameObject); } }
private void OnDestroy() { m_instance = null; }
void Start() { instance = this; }