FSM loses agent

NodeCanvas Forums Support FSM loses agent

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #9736

    Hi! I’m new around. I just start cheking this tool and noticed that my FSM loses agent (parent object) it still points to correct functions if it were doing it before, but restart of the project or sometimes even chekign dufferent things may lose connection. I have made one tree on Bahaviour Tree Owner which then contains FSM node. Its worth to note that Tree does not lose its parent and is linked correctly whole time its only FSM which behaves strange.
    First time FSM is made it have access to the parent which let me setup function execution on my script. But after unity restart, creation of any new function execution shows me list of the options which seems completely out of context. (eg list contains Rigidbody, light, camera and many other, most of which I do not even have on my scene)

    Any help is welcome.
    Thanks 🙂

    #9738
    Gavalakis
    Keymaster

    Hey there and welcome 🙂

    The reason this is happening, is because you are using a nested graph. Nested graphs unline local bound graphs, because they are asset files, they can’t have references to scene objects. (thats a common Unity “limitation” kind of).

    The way to work with scene object references in nested graphs would be using Blackboard Variables, instead of direct assignments. Since Blackboard is a component that lives in the scene on the GraphOwner’s gameobject, it CAN have scene object references.

    The reason you see the other types (Animation, Animator etc) in the Script Control tasks, is that because the object reference is lost, it instead shows other general Component types since there is not a reference to pick Components from.

    I hope this helps. Let me know.

    Cheers!

    Join us on Discord: https://discord.gg/97q2Rjh

    #9737

    Hi!

    Thanks for the answer, it seems to be correct answer and makes a lot of sense 🙂 cheers 🙂

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