예제 #1
0
 void OnDestroy()
 {
     if (instance == this)
     {
         instance = null;
     }
 }
예제 #2
0
        public static void ShowWindow()
        {
            if (instance == null)
            {
                instance = CreateInstance <BankRefreshWindow>();
                instance.titleContent = new GUIContent("FMOD Bank Refresh Status");
                instance.minSize      = new Vector2(400, 200);
                instance.maxSize      = new Vector2(1000, 200);

                instance.ShowUtility();
            }
        }
예제 #3
0
        void OnEnable()
        {
            serializedSettings = new SerializedObject(Settings.Instance);
            cooldown           = serializedSettings.FindProperty("BankRefreshCooldown");
            showWindow         = serializedSettings.FindProperty("ShowBankRefreshWindow");

            // instance is set to null when scripts are recompiled
            if (instance == null)
            {
                instance = this;
            }
            else if (instance != this)
            {
                Close();
            }
        }
예제 #4
0
        private static void CheckSourceFilesChanged()
        {
            if (sourceFilesChanged)
            {
                lastSourceFileChange = Time.realtimeSinceStartup;
                sourceFilesChanged   = false;

                if (!BankRefreshWindow.IsVisible)
                {
                    autoRefresh = true;
                }

                if (IsWindowEnabled())
                {
                    BankRefreshWindow.ShowWindow();
                }
            }
        }
예제 #5
0
 public static void HandleBankRefresh(string result)
 {
     lastSourceFileChange = float.MaxValue;
     BankRefreshWindow.HandleBankRefresh(result);
 }