using System; using System.Collections.Generic; using RMGUI.GraphView; using UnityEditor.Graphing.Drawing; using UnityEngine.MaterialGraph; namespace UnityEditor.MaterialGraph.Drawing { [Serializable] class UVNodeContolPresenter : GraphControlPresenter { public override void OnGUIHandler() { base.OnGUIHandler(); var cNode = node as UVNode; if (cNode == null) return; cNode.uvChannel = (UVChannel) EditorGUILayout.EnumPopup("Channel", cNode.uvChannel); } public override float GetHeight() { return EditorGUIUtility.singleLineHeight + 2 * EditorGUIUtility.standardVerticalSpacing; } } [Serializable] public class UVNodePresenter : MaterialNodePresenter { protected override IEnumerable GetControlData() { var instance = CreateInstance(); instance.Initialize(node); return new List { instance }; } } }