using System; using System.Collections.Generic; using UnityEditor.Experimental.UIElements.GraphView; using UnityEngine.MaterialGraph; namespace UnityEditor.MaterialGraph.Drawing { [Serializable] class BlendModeNodeControlPresenter : GraphControlPresenter { public override void OnGUIHandler() { base.OnGUIHandler(); var cNode = node as BlendModeNode; if (cNode == null) return; cNode.blendMode = (BlendModesEnum)EditorGUILayout.EnumPopup("", cNode.blendMode); } /* public override float GetHeight() { return EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing; } */ public override float GetHeight() { return EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing + EditorGUIUtility.standardVerticalSpacing; } } [Serializable] public class BlendModeNodePresenter : MaterialNodePresenter { protected override IEnumerable GetControlData() { var instance = CreateInstance(); instance.Initialize(node); return new List { instance }; } } }