Esempio n. 1
0
        /// <summary>
        /// Sets the Glass System Settings option 'useCusomGUI' if the user is using the Pro Unity Skin.
        /// </summary>
        public static void SetCustomGUI_IfPro()
        {
            string packagePath           = Application.dataPath + "/" + GlassManager.default_packageName + "/";
            string xmlPath               = packagePath + GlassManager.default_xml_Pathname + "/";
            string settingsPath          = xmlPath + GlassManager.default_settings_Filename + ".xml";
            GlassSystemSettings settings = GlassSystemSettings.LoadFromXML(settingsPath);

            if (EditorGUIUtility.isProSkin)
            {
                Debug.Log("Fantastic Glass :: User has Pro Unity Skin, enabling custom GUI skin - setting available from Glass Manager & Glass Maker.");
                settings.useCustomGUI = EditorGUIUtility.isProSkin;
            }
        }
Esempio n. 2
0
        public static GlassSystemSettings LoadFromXML(string path)
        {
            if (!File.Exists(path))
            {
                Debug.Log("Glass System Settings:  File does not exist '" + path + "'");
                return(null);
            }
            XmlSerializer       xmlserialiser  = new XmlSerializer(typeof(GlassSystemSettings));
            FileStream          filestream     = new FileStream(path, FileMode.Open);
            GlassSystemSettings loadedSettings = xmlserialiser.Deserialize(filestream) as GlassSystemSettings;

            filestream.Close();
            return(loadedSettings);
        }
Esempio n. 3
0
        void OnEnable()
        {
            if (tools == null)
            {
                tools = new EditorTools(toolsName);
            }

            if (manager == null)
            {
                manager = (GlassManager)target;
            }

            if (manager == null)
            {
                return;
            }

            if (renderOrderManager == null)
            {
                renderOrderManager = GlassRenderOrderManager.Instance;
            }

            manager.InitPaths();

            settings = manager.LoadSystemSettings();

            manager.LoadManager();

            UpdateTextureAAIndex();

            manager.UpdateActiveMaterials();

            if (!manager.LayersExist())
            {
                Show_LayersWarning();
            }
        }
Esempio n. 4
0
        public static GlassSystemSettings GenerateDefaultSettings()
        {
            GlassSystemSettings defaultSettings = new GlassSystemSettings();

            return(defaultSettings);
        }