Ejemplo n.º 1
0
 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>();
     }
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     // Singleton.
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
     gameObject.SetActive(false);
 }