void OnEnterPanel(AttachToPanelEvent e) { if (presenter == null) { presenter = BuildPresenters(); graphView.presenter = presenter; } }
private void OnChanged(UnityEngine.Object changedObject) { if (this.presenter == null && this.graphView.panel != null) { this.presenter = this.BuildPresenters(); this.graphView.presenter = this.presenter; } }
private void OnEnterPanel(AttachToPanelEvent e) { if (this.presenter == null) { this.presenter = this.BuildPresenters(); this.graphView.presenter = this.presenter; } }
void OnChanged(Object changedObject) { // If data was destroyed, remove the watch and try to re-create it if (presenter == null && graphView.panel != null) { presenter = BuildPresenters(); graphView.presenter = presenter; } }
protected void OnEnable() { this.presenter = this.BuildPresenters(); this.graphView = this.BuildView(); this.graphView.name = "theView"; this.graphView.persistenceKey = "theView"; this.graphView.presenter = this.presenter; this.graphView.StretchToParentSize(); this.graphView.RegisterCallback <AttachToPanelEvent>(new EventCallback <AttachToPanelEvent>(this.OnEnterPanel), Capture.NoCapture); if (this.dataWatchHandle == null) { this.dataWatchHandle = this.graphView.dataWatch.RegisterWatch(this.m_Presenter, new Action <UnityEngine.Object>(this.OnChanged)); } this.GetRootVisualContainer().Add(this.graphView); }
protected void OnEnable() { presenter = BuildPresenters(); graphView = BuildView(); graphView.name = "theView"; graphView.persistenceKey = "theView"; graphView.presenter = presenter; graphView.StretchToParentSize(); graphView.RegisterCallback <AttachToPanelEvent>(OnEnterPanel); if (dataWatchHandle == null) { dataWatchHandle = graphView.dataWatch.RegisterWatch(m_Presenter, OnChanged); } this.GetRootVisualContainer().Add(graphView); }