浏览代码

Add docking layout to blackbourd via GeometryChangedEvent on GraphView

/main
Jens Holm 7 年前
当前提交
7061787f
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
      com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs

8
com.unity.shadergraph/Editor/Drawing/Views/GraphEditorView.cs


}
}
void HandleEditorViewChanged(GeometryChangedEvent evt)
{
m_BlackboardProvider.blackboard.layout = m_FloatingWindowsLayout.blackboardLayout.GetLayout(m_GraphView.layout);
}
void StoreBlackboardLayoutOnGeometryChanged(GeometryChangedEvent evt)
{
UpdateSerializedWindowLayout();

// After the layout is restored from the previous session, start tracking layout changes in the blackboard.
m_BlackboardProvider.blackboard.RegisterCallback<GeometryChangedEvent>(StoreBlackboardLayoutOnGeometryChanged);
// After the layout is restored, track changes in layout and make the blackboard have the same behavior as the preview w.r.t. docking.
RegisterCallback<GeometryChangedEvent>(HandleEditorViewChanged);
}
void UpdateSerializedWindowLayout()

正在加载...
取消
保存