Using SwitchBehaviourTree

Forums 💬 NodeCanvas ⚙️ Support Using SwitchBehaviourTree

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #16874
    kirshor
    Participant

      I tested SwitchBehaviourTree action as below:
      Tree1: Sequence->Print Log 1, SwitchBehaviourTree To Tree2, Print Log2
      Tree2: Sequence->Print Log3

      The result when run is: Print Log1, Print Log3, Print Log2, Print Log3, Print Log3, …..
      Why “Print Log2” still run after call SwitchBehaviourTree Action
      I’m using the lasted version of NodeCanvas in Unity Asset Store.
      Help me, please.
      Thank you very much.

      #16876
      Gavalakis
      Keymaster

        Hello,

        Technically speaking, this happens because the Sequencer executes all it’s children in the same frame (in order), as long as none of them returns Running (which is the case here). I might be able to find a workaround solution for this, but may I ask what is the purpose of using an action in the Sequencer (like log in this example) after the “Switch Behaviour” action? Ideally, the “Switch Behaviour” action should be the last action of a sequencer for example.

        Please let me know.
        Thank you.

        #16875
        kirshor
        Participant

          My testing example just to help me understand the way SwitchBehaviourTree working. Thanks for your reply.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.