Ejemplo n.º 1
0
 public static void ReleaseInstance()
 {
     if (--_referenceCount == 0)
     {
         _instance.Dispose();
         _instance = null;
     }
 }
Ejemplo n.º 2
0
        public static UPaletteEditorApplication RequestInstance()
        {
            if (_referenceCount++ == 0)
            {
                _instance = new UPaletteEditorApplication();
            }

            return(_instance);
        }
Ejemplo n.º 3
0
        private static void OnPaletteStoreImported()
        {
            if (!_needReloading)
            {
                return;
            }

            // Reload on import for when assets are changed outside of the application, such as by version control tools.
            var app = UPaletteEditorApplication.RequestInstance();

            app.Reload();
            UPaletteEditorApplication.ReleaseInstance();
        }