public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { IsDrawing = true; //Init bool reloadUI = _isFirstOnGUICall || (_doReloadNextDraw && Event.current.type == EventType.Layout) || (materialEditor.target as Material).shader != Shader; if (reloadUI) { InitEditorData(materialEditor); Properties = props; InitlizeThryUI(); } //Update Data Properties = props; Shader = Materials[0].shader; Input.Update(IsLockedMaterial); ActiveRenderer = Selection.activeTransform?.GetComponent <Renderer>(); IsInAnimationMode = AnimationMode.InAnimationMode(); Active = this; GUIManualReloadButton(); GUIShaderVersioning(); GUITopBar(); GUISearchBar(); Presets.PresetEditorGUI(this); ShaderTranslator.SuggestedTranslationButtonGUI(this); //PROPERTIES foreach (ShaderPart part in MainGroup.parts) { part.Draw(); } //Render Queue selection if (VRCInterface.IsVRCSDKInstalled()) { _vRCFallbackProperty.Draw(); } if (Config.Singleton.showRenderQueue) { _renderQueueProperty.Draw(); } BetterTooltips.DrawActive(); GUIFooters(); HandleEvents(); IsDrawing = false; }
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { _isDrawing = true; //Init bool reloadUI = firstOnGUICall || (reloadNextDraw && Event.current.type == EventType.Layout) || (materialEditor.target as Material).shader != shader; if (reloadUI) { InitEditorData(materialEditor); properties = props; InitlizeThryUI(); } //Update Data properties = props; shader = materials[0].shader; UpdateEvents(); active = this; GUIManualReloadButton(); GUIShaderVersioning(); GUITopBar(); GUISearchBar(); GUIComplexity(); //Optimizer is now drawn wherever the property is. might change back later //ShaderOptimizerProperty?.Draw(); //PROPERTIES foreach (ShaderPart part in mainHeader.parts) { part.Draw(); } //Render Queue selection if (Config.Singleton.showRenderQueue) { materialEditor.RenderQueueField(); } BetterTooltips.DrawActive(); GUIFooters(); HandleEvents(); _isDrawing = false; }
public override void OnGUI(MaterialEditor materialEditor, MaterialProperty[] props) { _isDrawing = true; //Init bool reloadUI = firstOnGUICall || (reloadNextDraw && Event.current.type == EventType.Layout) || (materialEditor.target as Material).shader != shader; if (reloadUI) { InitEditorData(materialEditor); properties = props; InitlizeThryUI(); } //Update Data properties = props; shader = materials[0].shader; input.Update(isLockedMaterial); active = this; GUIManualReloadButton(); GUIShaderVersioning(); GUITopBar(); GUISearchBar(); Presets.PresetEditorGUI(this); //PROPERTIES foreach (ShaderPart part in mainGroup.parts) { part.Draw(); } //Render Queue selection if (Config.Singleton.showRenderQueue) { materialEditor.RenderQueueField(); } BetterTooltips.DrawActive(); GUIFooters(); HandleEvents(); _isDrawing = false; }