private void OnValidate() { if (itemTooltip == null) { // Find the tooltip. Only run in the editor. // Normally, it would be SLOW, but since it's just in the editor, it's OK. itemTooltip = FindObjectOfType <ItemTooltip>(); } }
private void Awake() { // Singleton. if (Instance == null) { Instance = this; } else { Destroy(this); } gameObject.SetActive(false); }