NodeCanvas and UNet

Forums 💬 NodeCanvas 🗨️ General Discussion NodeCanvas and UNet

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13873
    munro
    Participant

      Hello,

      You mentioned that it is possible to use NodeCanvas with UNet in your documentation. I’ve been configuring a behaviour tree to run on an npc object that I am spawning using UNet.

      What are your recommendations to stop the behaviour tree from running on both the server and client instances? How should I configure my behaviour tree to only execute on the server instance?

      James

      #13874
      Gavalakis
      Keymaster

        Hello,

        Sorry for the late reply.

        Just to clarify, the documentation relevant to UNET refers to the ability of Blackboard Variables to sync through the network, by using the SyncBlackboard component 🙂

        For what you are after, I think a good solution would be to create a custom NetworkBehaviour script, attach it to the same gameobject that the BehaviourTreeOwner is attached to and use the NetworkBehaviour API like ‘isServer’ for example, to act accordingly, like in your example case, stop the behaviour by calling GetComponent<BehaviourTreeOwner>().StopBehaviour().

        Please let me know if that works for you.
        Thanks!

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