public static void CreateWindow(BehaviourTree tree) { if (!tree) { return; } BehaviourTreeEditor wnd = GetWindow <BehaviourTreeEditor>(); wnd.minSize = BehaviourTreeSettings.GetOrCreate().minWindowSize; wnd.titleContent = new GUIContent("行为树编辑器"); Selection.activeObject = tree; wnd.ChangeTreeBySelection(); }
public static void CreateWindow(BehaviourExecutor executor) { if (!executor) { return; } BehaviourTreeEditor wnd = GetWindow <BehaviourTreeEditor>(); wnd.minSize = BehaviourTreeSettings.GetOrCreate().minWindowSize; wnd.titleContent = new GUIContent("行为树编辑器"); Selection.activeGameObject = executor.gameObject; EditorGUIUtility.PingObject(executor); wnd.ChangeTreeBySelection(executor); }