Exemplo n.º 1
0
 void Awake()
 {
     if (instance && instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         DontDestroyOnLoad(gameObject);
         instance = this;
     }
 }
Exemplo n.º 2
0
    public void OnDrawGizmos()
    {
        instance = this;

        if (EditorPrefs.GetBool(APGlobals.ShouldRefreshHotkeys))
        {
            EditorPrefs.SetBool(APGlobals.ShouldRefreshHotkeys, false);
            shouldResetHotKeys = true;
        }

        if (shouldResetHotKeys)
        {
            shouldResetHotKeys = false;
            SaveAllHotKeys();
        }

        if (shouldResetAssets)
        {
            Refresh();
        }

        UpdateSelectedAsset();
    }