private void Awake() { if (m_instance == null) { m_instance = this; } else { Debug.LogError("Singleton component 'GameCursor' awoke multiple times! Remove this component from all objects except global prefabs. (Second object: '" + base.name + "')"); } Cursor.lockState = CursorLockMode.None; //Cursor.visible = false; m_activeCursor = CursorType.None; m_desiredCursor = CursorType.Normal; }
private void OnDestroy() { m_instance = null; ResetShowCursor(); }