This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This MonoBehaviour makes sure that you always have a Canvas element selected. | |
| // By default, whenever you click anywhere on the screen that is not a Selectable, the | |
| // currently selected GameObject will be set to null and nothing will be selected. | |
| // Add this component to the EventSystem GameObject and enjoy :) | |
| using UnityEngine; | |
| using UnityEngine.EventSystems; | |
| using UnityEngine.UI; | |
| namespace UICodeExample.Code.UI |