Exemple #1
0
 private void Awake()
 {
     instance = this;
     if (!isInitialized)
     {
         Initialize();
     }
 }
Exemple #2
0
        private static void NewMenuOption()
        {
            TooltipManager tooltipManager = FindObjectOfType <TooltipManager>();

            if (tooltipManager != null)
            {
                Debug.LogWarning("Tooltip Manager already exists in this scene. Setup aborted.");
                return;
            }

            TooltipManager tooltipManagerPrefab = Resources.Load <TooltipManager>("TooltipManager");

            if (tooltipManagerPrefab == null)
            {
                Debug.LogError("TooltipManager prefab could not be loaded from Resources folder. Setup aborted.");
                return;
            }
            tooltipManager      = Instantiate(tooltipManagerPrefab);
            tooltipManager.name = "TooltipMananger";
            tooltipManager.transform.SetAsFirstSibling();
        }
Exemple #3
0
 private void Awake()
 {
     instance = this;
     if (!isInitialized)
         Initialize();
 }