浏览代码

Re-create presenter if it's null during update (#37, #39)

/main
Peter Bay Bastian 7 年前
当前提交
931a7f8b
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/AbstractMaterialGraphEditWindow.cs

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/AbstractMaterialGraphEditWindow.cs


using UnityEngine;
using UnityEngine.Graphing;
using UnityEngine.MaterialGraph;
using UnityEngine.SceneManagement;
using Object = UnityEngine.Object;
namespace UnityEditor.MaterialGraph.Drawing

{
if (m_GraphEditorView != null)
{
if (m_GraphEditorView.presenter == null)
{
var presenter = CreateInstance<GraphEditorPresenter>();
presenter.Initialize(inMemoryAsset, this, selected.name);
m_GraphEditorView.presenter = presenter;
}
m_GraphEditorView.presenter.graphPresenter.UpdateTimeDependentNodes();
}
}

正在加载...
取消
保存