private void OnEnable() { if (EditorGUIUtility.isProSkin) { titleContent = new GUIContent("Behaviour", BehaviourGraphResources.Instance.DarkThemeIcon); } else { titleContent = new GUIContent("Behaviour", BehaviourGraphResources.Instance.LightThemeIcon); } if (GraphFrame == null) { GraphFrame = new BehaviourGraphFrame(); } GraphFrame.Window = this; GraphFrame.OnEnable(); }
public override IEnumerable <FrameTab> SpawnChildren() { foreach (var field in AllFields(EditorSession.Root)) { if (field.Field.Type == "SerializedGraph") { var frame = new BehaviourGraphFrame { View = new BehaviourEditorView() }; frame.View.BeginSession(field.Session, field.Value as EditorObject); yield return(new FrameTab() { Title = new GUIContent(field.Field.Name), Frame = frame, }); } } }