浏览代码

Frame all after opening window (#52)

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

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


using System.Text;
using UnityEditor.Experimental.UIElements.GraphView;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEngine.Graphing;
using UnityEngine.MaterialGraph;
using UnityEngine.SceneManagement;

var presenter = CreateInstance<GraphEditorPresenter>();
presenter.Initialize(inMemoryAsset, this, selected.name);
m_GraphEditorView.presenter = presenter;
m_GraphEditorView.RegisterCallback<PostLayoutEvent>(OnPostLayout);
}
void OnPostLayout(PostLayoutEvent evt)
{
m_GraphEditorView.UnregisterCallback<PostLayoutEvent>(OnPostLayout);
m_GraphEditorView.graphView.FrameAll();
}
}
}
正在加载...
取消
保存