浏览代码

Remove needless inheritance from MaterialNodePresenter in GraphControlPresenter

/main
Peter Bay Bastian 7 年前
当前提交
8bfc6985
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GraphControlPresenter.cs
  2. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GraphControlPresenter.cs


namespace UnityEditor.MaterialGraph.Drawing
{
[Serializable]
public abstract class GraphControlPresenter : MaterialNodePresenter
public abstract class GraphControlPresenter : ScriptableObject
{
public INode node { get; private set; }

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs


void InvalidateUIIfNeedsTime(TimerState timerState)
{
var node = GetPresenter<MaterialNodePresenter>();
if (node.requiresTime)
var nodePresenter = GetPresenter<MaterialNodePresenter>();
if (nodePresenter.requiresTime)
node.OnModified(ModificationScope.Node);
nodePresenter.OnModified(ModificationScope.Node);
UpdatePreviewTexture(m_CurrentPreview);
}
}

正在加载...
取消
保存