How to distinguish multiple graphOwner in one Gameobject

Forums 💬 NodeCanvas ⚙️ Support How to distinguish multiple graphOwner in one Gameobject

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #18962
    chaos_pku
    Participant

      Hi:

      I read you don’t recommend one GO have 2 or more graphOwner in http://nodecanvas.com/forums/topic/multiple-behaviour-trees/
      however I need 4 graphOwner (2BT, 2FSM) to control 1 GO, one handle IO, one handle State, …
      In a word, Each control a certain aspect of a GO, they are paralleled.

      My question is how to distinguish each graphOwner? So that I can send event to the one certain graphOwner in the 4 owners.
      Now, my handle is send to self. All owners can get event. This can fulfill my requirement but not good.

      Could you give me some advice about :
      1. Should 1 Go have 1 owner? so I need depart 4 owner into 4 GO.
      2. If 1 Go have 4 owner, How to get certain owner?

      Thanks

      #18964
      Gavalakis
      Keymaster

        Hello,

        Sorry for the late reply.

        Generaly speaking, in Unity, components can’t be dinstict between one another of the same type. Thats also the reason why Unity doesn’t allow the same type of component in most native types (such as Animator, Animation, Rigidbody, Collider etc).

        I could go by this paradigm and disallow having multiples of the same GraphOwner types (2 FSMOwners or 2 BTOwners), but I thought of not adding this restriction, since practicaly having the same GraphOwner type on the same GameObject works, although it’s not possible to dinsict between one another.

        Events being received by all GraphOwners on the same GameObject, I consider it to be quite convenient and allow for an agent centric workflow and setup, rather than a Graph centric one.

        So, if you dont want events send to an agent to be received by some GraphOwner, then yes, those GraphOwners would need to be attached on seperate GameObjects.

        Let me know if you have any more questions or need more clarification on the matter.

        Thanks! 🙂

        #18963
        cbrandick
        Participant

          This is how I am doing it. I just posted about having issues pausing/playing BTs so it may not be perfect, but I do believe it is a solution.

          I hope that helps.

          -C

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