浏览代码

[Material graph] Fix control id issues when there are two nodes of the same type

/main
Tim Cooper 8 年前
当前提交
51f6cf0b
共有 2 个文件被更改,包括 10 次插入1 次删除
  1. 3
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/MaterialNodeData.cs
  2. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/NodeDrawers/AbstractMaterialNodeUI.cs

3
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/MaterialNodeData.cs


{
public override void OnGUIHandler()
{
base.OnGUIHandler ();
cNode.color = EditorGUILayout.ColorField("Color", cNode.color);
}
}

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/NodeDrawers/AbstractMaterialNodeUI.cs


node = inNode;
}
public abstract void OnGUIHandler();
public virtual void OnGUIHandler()
{
if (node == null)
return;
GUIUtility.GetControlID (node.guid.GetHashCode(), FocusType.Passive);
}
}
[Serializable]

正在加载...
取消
保存