private void OpenGraphAsset(UnityObject unityObject, bool shouldSetSceneAsDirty) { shouldCloseWindow = true; ScriptGraphAsset scriptGraphAsset = unityObject as ScriptGraphAsset; GraphReference graphReference = null; if (scriptGraphAsset != null) { graphReference = GraphReference.New(scriptGraphAsset, true); } else { StateGraphAsset stateGraphAsset = unityObject as StateGraphAsset; if (stateGraphAsset != null) { graphReference = GraphReference.New(stateGraphAsset, true); } } if (shouldSetSceneAsDirty) { EditorSceneManager.MarkSceneDirty(SceneManager.GetActiveScene()); } GraphWindow.OpenActive(graphReference); GUIUtility.ExitGUI(); }
private void OpenGraphAsset(UnityObject unityObject) { shouldCloseWindow = true; ScriptGraphAsset scriptGraphAsset = unityObject as ScriptGraphAsset; GraphReference graphReference = null; if (scriptGraphAsset != null) { graphReference = GraphReference.New(scriptGraphAsset, true); } else { StateGraphAsset stateGraphAsset = unityObject as StateGraphAsset; if (stateGraphAsset != null) { graphReference = GraphReference.New(stateGraphAsset, true); } } GraphWindow.OpenActive(graphReference); }