示例#1
0
        public override void OnGUIFamily(ShaderGUITreeView treeView)
        {
            if (!this.isVisible)
            {
                return;
            }

            using (var dis = new EditorGUI.DisabledGroupScope(this.isDisabled))
            {
                if (!this.hasChildren)
                {
                    return;
                }
                using (var chk = new EditorGUI.ChangeCheckScope())
                {
                    foreach (var it in this.children)
                    {
                        it.OnGUIFamily(treeView);
                    }

                    var data = new EventData(this, chk.changed);
                    afterCallback.Invoke(data);
                    data.Dispose();
                }
            }
        }
示例#2
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            var editor  = treeView.materialEditor;
            var texProp = treeView.GetRegisteredProperty(textureProperty);

            editor.TextureScaleOffsetProperty(texProp);
        }
示例#3
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            var prop  = treeView.GetRegisteredProperty(property);
            var label = this.labelContent == null ? prop.displayName : labelContent.text;

            treeView.materialEditor.ShaderProperty(prop, label);
        }
示例#4
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            var tex = treeView.GetRegisteredProperty(textureProperty);
            var col = treeView.GetRegisteredProperty(colorProperty);

            treeView.materialEditor.TexturePropertyWithHDRColor(this.labelContent, tex, col, null, this.showAlpha);
        }
示例#5
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            var editor  = treeView.materialEditor;
            var texProp = treeView.GetRegisteredProperty(this.textureProperty);
            var ex1     = treeView.GetRegisteredProperty(this.extraProperty1);
            var ex2     = treeView.GetRegisteredProperty(this.extraProperty2);

            editor.TexturePropertyTwoLines(this.labelContent, texProp, ex1, this.labelContant2, ex2);
        }
示例#6
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            var editor = treeView.materialEditor;
            var tex    = treeView.GetRegisteredProperty(textureProperty);
            var ex1    = treeView.GetRegisteredProperty(extraProperty1);
            var ex2    = treeView.GetRegisteredProperty(extraProperty2);

            editor.TexturePropertySingleLine(this.labelContent, tex, ex1, ex2);
        }
示例#7
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            if (this.isExpanded = NowhereEditorGUILayout.HorizontalSplitter(this.isExpanded, this.labelContent))
            {
                var editor = treeView.materialEditor;

                editor.EnableInstancingField();
                editor.RenderQueueField();
                editor.DoubleSidedGIField();
            }
        }
示例#8
0
 public override void OnGUIRow(ShaderGUITreeView treeView)
 {
     if (this.foldout = NowhereEditorGUILayout.HorizontalSplitter(this.foldout, this.labelContent))
     {
         foreach (var it in treeView.miscProperties)
         {
             treeView.materialEditor.ShaderProperty(it, it.displayName);
         }
         EditorGUILayout.Space();
     }
 }
示例#9
0
 public override void OnGUIRow(ShaderGUITreeView treeView)
 {
     if (flexibleSpace)
     {
         GUILayout.FlexibleSpace();
     }
     else
     {
         EditorGUILayout.Space();
     }
 }
示例#10
0
        public override void OnGUIFamily(ShaderGUITreeView treeView)
        {
            if (!this.isVisible)
            {
                return;
            }

            if (this.isExpanded = NowhereEditorGUILayout.HorizontalSplitter(this.isExpanded, new GUIContent("Tree Debug")))
            {
                using (var vt = new GUILayout.VerticalScope(GUI.skin.box))
                {
                    DrawChildren(treeView.rootItem);
                }
            }
        }
示例#11
0
        public override void OnGUIFamily(ShaderGUITreeView treeView)
        {
            if (!this.isVisible)
            {
                return;
            }

            using (var dis = new EditorGUI.DisabledGroupScope(this.isDisabled))
            {
                OnGUIRow(treeView);
                if (this.isExpanded && hasChildren)
                {
                    foreach (var it in this.children)
                    {
                        it.OnGUIFamily(treeView);
                    }
                }
            }
        }
示例#12
0
        public override void OnGUIFamily(ShaderGUITreeView treeView)
        {
            if (!this.isVisible)
            {
                return;
            }

            using (var dis = new EditorGUI.DisabledGroupScope(this.isDisabled))
            {
                this.isExpanded = treeView.materialEditor.EmissionEnabledProperty();

                if (!this.isExpanded || !this.hasChildren)
                {
                    return;
                }
                foreach (var it in this.children)
                {
                    it.OnGUIFamily(treeView);
                }
            }
        }
示例#13
0
        public override void OnGUIRow(ShaderGUITreeView treeView)
        {
            var ind = (labelIndent == -1) ? EditorGUI.indentLevel : labelIndent;

            treeView.materialEditor.LightmapEmissionFlagsProperty(ind, emissionEnabled);
        }
示例#14
0
 public override void OnGUIRow(ShaderGUITreeView treeView)
 {
     this.isExpanded = NowhereEditorGUILayout.HorizontalSplitter(this.isExpanded, this.labelContent);
 }
示例#15
0
 public override void OnGUIRow(ShaderGUITreeView treeView)
 {
     this.isExpanded = EditorGUILayout.Foldout(this.isExpanded, this.labelContent);
 }
示例#16
0
 public override void OnGUIRow(ShaderGUITreeView treeView)
 {
     GUILayout.Label(this.labelContent, style);
 }