using System; using System.Collections.Generic; using UnityEditor.Experimental.UIElements.GraphView; using UnityEngine; using UnityEngine.MaterialGraph; namespace UnityEditor.MaterialGraph.Drawing { /* class TextureSamplerContolPresenter : GraphControlPresenter { private string[] m_TextureTypeNames; private string[] textureTypeNames { get { if (m_TextureTypeNames == null) m_TextureTypeNames = Enum.GetNames(typeof(TextureType)); return m_TextureTypeNames; } } public override void OnGUIHandler() { base.OnGUIHandler(); var tNode = node as UnityEngine.MaterialGraph.Texture2DNode; if (tNode == null) return; tNode.exposedState = (PropertyNode.ExposedState)EditorGUILayout.EnumPopup(new GUIContent("Exposed"), tNode.exposedState); tNode.defaultTexture = EditorGUILayout.MiniThumbnailObjectField(new GUIContent("Texture"), tNode.defaultTexture, typeof(Texture), null) as Texture; tNode.textureType = (TextureType)EditorGUILayout.Popup((int)tNode.textureType, textureTypeNames, EditorStyles.popup); } public override float GetHeight() { return 3 * (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing) + EditorGUIUtility.standardVerticalSpacing; } } [Serializable] public class TextureSamplerNodePresenter : MaterialNodePresenter { protected override IEnumerable GetControlData() { var instance = CreateInstance(); instance.Initialize(node); return new List { instance }; } }*/ }