public static SO_BehaviourTreeEditorWindow OpenBehaviourTreeEditorWindow(SO_BehaviourTree bt) { window = EditorWindow.GetWindow <SO_BehaviourTreeEditorWindow>("Behaviour Tree"); Texture icon = AssetDatabase.LoadAssetAtPath <Texture>("Assets/AndreLibrary/Editor/BT_Icon.png"); GUIContent titleContent = new GUIContent("Behaviour Tree", icon); window.titleContent = titleContent; tex = AssetDatabase.LoadAssetAtPath <Texture>("Assets/AndreLibrary/Editor/BT_Lighter_Black.jpg"); sidemenuNodeTex = AssetDatabase.LoadAssetAtPath <Texture>("Assets/AndreLibrary/Editor/BT/BT_Light_Blue.jpg") as Texture2D; sidemenuTex = AssetDatabase.LoadAssetAtPath <Texture>("Assets/AndreLibrary/Editor/BT/BT_Blue_Grey.jpg") as Texture2D; return(window); }
public static bool OnOpenBehaviourTree(int instanceID, int line) { SO_BehaviourTree Bt = EditorUtility.InstanceIDToObject(instanceID) as SO_BehaviourTree; if (Bt != null) { SO_BehaviourTreeEditorWindow editorWindow = OpenBehaviourTreeEditorWindow(Bt); editorWindow.BehaviourTree = Bt; editorWindow.SideMenuAssetToUpdate = Bt.root; return(true); } return(false); }