您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

41 行
1.5 KiB

using System;
using System.Collections.Generic;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine.MaterialGraph;
namespace UnityEditor.MaterialGraph.Drawing
{
class LevelsControlPresenter : GraphControlPresenter
{
public override void OnGUIHandler()
{
base.OnGUIHandler();
var tNode = node as LevelsNode;
if (tNode == null)
return;
/*tNode.inputMin = EditorGUILayout.FloatField("InputMin:", tNode.inputMin);
tNode.inputMax = EditorGUILayout.FloatField("InputMax:", tNode.inputMax);
tNode.inputGamma = EditorGUILayout.FloatField("InputGamma:", tNode.inputGamma);
tNode.outputMin = EditorGUILayout.FloatField("OutputMin:", tNode.outputMin);
tNode.outputMax = EditorGUILayout.FloatField("OutputMax:", tNode.outputMax);*/
}
public override float GetHeight()
{
return (EditorGUIUtility.singleLineHeight * 5 + EditorGUIUtility.standardVerticalSpacing) + EditorGUIUtility.standardVerticalSpacing;
}
}
[Serializable]
public class LevelsNodePresenter : PropertyNodePresenter
{
protected override IEnumerable<GraphControlPresenter> GetControlData()
{
var instance = CreateInstance<LevelsControlPresenter>();
instance.Initialize(node);
return new List<GraphControlPresenter>(base.GetControlData()) { instance };
}
}
}