|
|
|
|
|
|
using System; |
|
|
|
using System.Runtime.Remoting.Messaging; |
|
|
|
using RMGUI.GraphView; |
|
|
|
using UnityEngine; |
|
|
|
using UnityEngine.Graphing; |
|
|
|
|
|
|
|
|
|
|
protected GraphView graphView |
|
|
|
{ |
|
|
|
get { return m_GraphEditorDrawer.GraphView; } |
|
|
|
get { return m_GraphEditorDrawer.graphView; } |
|
|
|
} |
|
|
|
|
|
|
|
private GraphEditorDrawer m_GraphEditorDrawer; |
|
|
|
|
|
|
Repaint(); |
|
|
|
} |
|
|
|
|
|
|
|
private bool focused { get; set; } |
|
|
|
private void Focus(TimerState timerState) |
|
|
|
{ |
|
|
|
m_GraphEditorDrawer.graphView.FrameAll(); |
|
|
|
focused = true; |
|
|
|
} |
|
|
|
|
|
|
|
void OnSelectionChange() |
|
|
|
{ |
|
|
|
if (Selection.activeObject == null || !EditorUtility.IsPersistent(Selection.activeObject)) |
|
|
|
|
|
|
var source = CreateDataSource(); |
|
|
|
source.Initialize(m_LastSelection, this); |
|
|
|
m_GraphEditorDrawer.dataSource = source; |
|
|
|
|
|
|
|
focused = false; |
|
|
|
m_GraphEditorDrawer.graphView.Schedule(Focus).StartingIn(1).Until(() => focused); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|