public RampSection(ToonyStandardGUI inspector, MaterialProperty[] properties, bool open, bool enabled) : base(Styles.title, open, enabled) { FindProperties(properties); this.inspector = inspector; gradientEditor = new GradientEditor(); isGradientEditorOpen = false; needToStorePreviousRamp = true; Selection.selectionChanged += ResetRampTexture; }
public SpecularSection(MaterialProperty[] properties, InspectorLevel level, ToonyStandardGUI gui, bool open, bool enabled) : base(Styles.title, open, enabled) { FindProperties(properties); this.inspector = gui; this.level = level; foreach (Material mat in _SpecularOn.targets) { TSFunctions.SetKeyword(mat, "_SPECULARHIGHLIGHTS_OFF", !(mat.GetFloat(_SpecularOn.name) != 0)); SetupWorkflow(mat, (Workflow)_workflow.floatValue); SetupSpMode(mat, (SpMode)_SpMode.floatValue); } gradientEditor = new GradientEditor(); isGradientEditorOpen = false; needToStorePreviousRamp = true; Selection.selectionChanged += ResetRampTexture; }
private void Start() { gradientEditor = new GradientEditor(); }