C Coder New member Aug 3, 2023 #1 I'm working on an Inspector that lists ExternalBehaviour assets. Next to each entry in that list, I'd like to have a button that opens the corresponding BehaviourTree inside BehaviourEditor. How would I go about that?
I'm working on an Inspector that lists ExternalBehaviour assets. Next to each entry in that list, I'd like to have a button that opens the corresponding BehaviourTree inside BehaviourEditor. How would I go about that?
Justin Administrator Staff member Aug 4, 2023 #2 Take a look at this post: https://opsive.com/forum/index.php?threads/editor-i-want-to-get-tree-information.9779/
Take a look at this post: https://opsive.com/forum/index.php?threads/editor-i-want-to-get-tree-information.9779/
C Coder New member Aug 4, 2023 #3 Thanks for answering. When using that code Code: BehaviorDesignerWindow.ShowWindow(); BehaviorDesignerWindow.instance.LoadBehavior(behavior.GetBehaviorSource(), false, true); the Editor keeps opening the Tree, which belongs to the Behaviour component, that lives on the same GameObject, as my custom Inspector. So I had to do this... Code: Behaviour.ExternalBehavior = behavior; BehaviorDesignerWindow.ShowWindow(); BehaviorDesignerWindow.instance.LoadBehavior(behavior.GetBehaviorSource(), false, true);
Thanks for answering. When using that code Code: BehaviorDesignerWindow.ShowWindow(); BehaviorDesignerWindow.instance.LoadBehavior(behavior.GetBehaviorSource(), false, true); the Editor keeps opening the Tree, which belongs to the Behaviour component, that lives on the same GameObject, as my custom Inspector. So I had to do this... Code: Behaviour.ExternalBehavior = behavior; BehaviorDesignerWindow.ShowWindow(); BehaviorDesignerWindow.instance.LoadBehavior(behavior.GetBehaviorSource(), false, true);