//-------------Draw Functions---------------- public void InitlizeThryUI() { Config config = Config.Singleton; show_eyeIcon_tutorial = !EditorPrefs.GetBool("thry_openeEyeIcon", false); active = this; //get material targets materials = editor.targets.Select(o => o as Material).ToArray(); shader = materials[0].shader; string defaultShaderName = materials[0].shader.name.Split(new string[] { "-queue" }, System.StringSplitOptions.None)[0].Replace(".differentQueues/", ""); defaultShader = Shader.Find(defaultShaderName); animPropertySuffix = new string(materials[0].name.Trim().ToLower().Where(char.IsLetter).ToArray()); //collect shader properties CollectAllProperties(); if (ShaderOptimizer.IsShaderUsingThryOptimizer(shader)) { ShaderOptimizerProperty = propertyDictionary[ShaderOptimizer.GetOptimizerPropertyName(shader)]; } AddResetProperty(); firstOnGUICall = false; }
//-------------Draw Functions---------------- public void InitlizeThryUI() { Config config = Config.Singleton; active = this; //get material targets materials = editor.targets.Select(o => o as Material).ToArray(); shader = materials[0].shader; animPropertySuffix = ShaderOptimizer.GetAnimPropertySuffix(materials[0]); _isPresetEditor = materials.Length == 1 && Presets.ArePreset(materials); //collect shader properties CollectAllProperties(); if (ShaderOptimizer.IsShaderUsingThryOptimizer(shader)) { ShaderOptimizerProperty = propertyDictionary[ShaderOptimizer.GetOptimizerPropertyName(shader)]; if (ShaderOptimizerProperty != null) { ShaderOptimizerProperty.exempt_from_locked_disabling = true; } } AddResetProperty(); firstOnGUICall = false; }
//-------------Draw Functions---------------- public void InitlizeThryUI() { Config config = Config.Singleton; Active = this; Helper.RegisterEditorUse(); //get material targets Materials = Editor.targets.Select(o => o as Material).ToArray(); Shader = Materials[0].shader; RenamedPropertySuffix = ShaderOptimizer.GetRenamedPropertySuffix(Materials[0]); IsPresetEditor = Materials.Length == 1 && Presets.ArePreset(Materials); //collect shader properties CollectAllProperties(); if (ShaderOptimizer.IsShaderUsingThryOptimizer(Shader)) { ShaderOptimizerProperty = PropertyDictionary[ShaderOptimizer.GetOptimizerPropertyName(Shader)]; if (ShaderOptimizerProperty != null) { ShaderOptimizerProperty.ExemptFromLockedDisabling = true; } } _renderQueueProperty = new RenderQueueProperty(this); _vRCFallbackProperty = new VRCFallbackProperty(this); ShaderParts.Add(_renderQueueProperty); ShaderParts.Add(_vRCFallbackProperty); AddResetProperty(); _isFirstOnGUICall = false; }