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