您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
32 行
741 B
32 行
741 B
using System;
|
|
using UnityEditor.Experimental.UIElements.GraphView;
|
|
using UnityEditor.MaterialGraph.Drawing;
|
|
using UnityEngine;
|
|
using UnityEngine.Graphing;
|
|
|
|
namespace UnityEditor.MaterialGraph.Drawing
|
|
{
|
|
[Serializable]
|
|
public abstract class GraphControlPresenter : ScriptableObject
|
|
{
|
|
public INode node { get; private set; }
|
|
|
|
protected GraphControlPresenter()
|
|
{}
|
|
|
|
public void Initialize(INode inNode)
|
|
{
|
|
node = inNode;
|
|
}
|
|
|
|
public virtual void OnGUIHandler()
|
|
{
|
|
if (node == null)
|
|
return;
|
|
|
|
GUIUtility.GetControlID(node.guid.GetHashCode(), FocusType.Passive);
|
|
}
|
|
|
|
public abstract float GetHeight();
|
|
}
|
|
}
|