浏览代码
Add presenter for GraphEditorView, such that the presenter hierarchy makes more sense (also, pass through asset name to graph inspector #31)
/main
Add presenter for GraphEditorView, such that the presenter hierarchy makes more sense (also, pass through asset name to graph inspector #31)
/main
Peter Bay Bastian
7 年前
当前提交
8e1d62b6
共有 7 个文件被更改,包括 107 次插入 和 91 次删除
-
60MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/AbstractMaterialGraphEditWindow.cs
-
4MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GraphInspectorPresenter.cs
-
37MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs
-
36MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs
-
10MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialGraphView.cs
-
48MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GraphEditorPresenter.cs
-
3MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GraphEditorPresenter.cs.meta
|
|||
using UnityEngine; |
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEditor.MaterialGraph.Drawing |
|||
{ |
|||
public class GraphEditorPresenter : ScriptableObject |
|||
{ |
|||
[SerializeField] |
|||
TitleBarPresenter m_TitleBarPresenter; |
|||
|
|||
[SerializeField] |
|||
MaterialGraphPresenter m_GraphPresenter; |
|||
|
|||
[SerializeField] |
|||
GraphInspectorPresenter m_GraphInspectorPresenter; |
|||
|
|||
public TitleBarPresenter titleBarPresenter |
|||
{ |
|||
get { return m_TitleBarPresenter; } |
|||
set { m_TitleBarPresenter = value; } |
|||
} |
|||
|
|||
public MaterialGraphPresenter graphPresenter |
|||
{ |
|||
get { return m_GraphPresenter; } |
|||
set { m_GraphPresenter = value; } |
|||
} |
|||
|
|||
public GraphInspectorPresenter graphInspectorPresenter |
|||
{ |
|||
get { return m_GraphInspectorPresenter; } |
|||
set { m_GraphInspectorPresenter = value; } |
|||
} |
|||
|
|||
public void Initialize(IGraph graph, IMaterialGraphEditWindow container, string graphName) |
|||
{ |
|||
m_TitleBarPresenter = CreateInstance<TitleBarPresenter>(); |
|||
m_TitleBarPresenter.Initialize(container); |
|||
|
|||
m_GraphInspectorPresenter = CreateInstance<GraphInspectorPresenter>(); |
|||
m_GraphInspectorPresenter.Initialize(graphName); |
|||
|
|||
m_GraphPresenter = CreateInstance<MaterialGraphPresenter>(); |
|||
m_GraphPresenter.Initialize(graph, container); |
|||
m_GraphPresenter.onSelectionChanged += m_GraphInspectorPresenter.UpdateSelection; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: fabca78859dd4417a90ce77e22bee37c |
|||
timeCreated: 1504007101 |
撰写
预览
正在加载...
取消
保存
Reference in new issue