|
|
|
|
|
|
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.RegisterCallback<PostLayoutEvent>(OnPostLayout); |
|
|
|
} |
|
|
|
CreatePresenter(); |
|
|
|
m_GraphEditorView.presenter.graphPresenter.UpdateTimeDependentNodes(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
inMemoryAsset.OnEnable(); |
|
|
|
inMemoryAsset.ValidateGraph(); |
|
|
|
|
|
|
|
m_GraphEditorView.presenter = null; |
|
|
|
CreatePresenter(); |
|
|
|
} |
|
|
|
|
|
|
|
void CreatePresenter() |
|
|
|
{ |
|
|
|
var presenter = CreateInstance<GraphEditorPresenter>(); |
|
|
|
presenter.Initialize(inMemoryAsset, this, selected.name); |
|
|
|
m_GraphEditorView.presenter = presenter; |
|
|
|
m_GraphEditorView.RegisterCallback<PostLayoutEvent>(OnPostLayout); |
|
|
|
} |
|
|
|
|
|
|
|
void OnPostLayout(PostLayoutEvent evt) |
|
|
|