Behaviour tree is renamed by NodeCanvas

NodeCanvas Forums General Discussion Behaviour tree is renamed by NodeCanvas

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9340
    etabubu
    Participant

    Hi,

    I have a gameobject which has a BheviourTreeOwner component. From there I created a simple behaviour tree and named it “DeerWalkBT”. And it works correctly.
    Then from Window–>NodeCanvas I created a FSM and that was added to the scene root.
    In this state machine I created a Nested BehaviourTree node and selected the previously created BT named “DeerWalkBT”. As soon as I did that (by clicking on the small circle and selecting it from the Unity pop up) my BT was renamed “BehaviourTree”.
    If I try to rename it back to “DeerWalkBT” (or anything else) the nested node is deleted.

    I’m not sure I understand this feature… I don’t want to have all my BTs named “BehaviourTree”.

    Thanks!

    #9343
    Gavalakis
    Keymaster

    Hello,

    All that is happening is that the behaviour tree assigned in a Nested Behaviour Tree State, is always named after the State’s name. If you change the state node name to anything, so will the assigned behaviour tree. This is done to keep naming consinstency.
    The node never get’s deleted because of changing names though 🙂 I suppose you just selected back the BehaviourTreeOwner so the NC Editor loaded that behaviour tree back and you though of it deleted? Please confirm.

    If you don’t want NC editor to automaticaly change based on selection, you can lock the editor (button on far right in the top toolbar ‘Lock’)

    Furthermore the gameobject name is always named after the graph name.

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

    #9342
    etabubu
    Participant

    This is very unintuitive IMO. If I create a behaviour tree and I work on that and name it “DeerBT” it’s because I want to be able to quickly select it from the hierarchy. If, at some point, I decide to use this tree also as a nested BT in a FSM, NC should never change its name (especially without asking) because a) “it ruins my plan” and b) I could have referenced that tree by name in some of my scripts and it wouldn’t work anymore.

    With no offence 🙂

    I also noticed that on the other hand, a nested FSM node in a BT doesn’t work that way. It works as I would expect.
    So I changed the code in FSMNestedBT.cs at line 131 to this:
    nestedBT.graphName = EditorGUILayout.TextField(“Name”, nestedBT.graphName);//nodeName;

    and now it works as expected 🙂

    Please consider changing it!

    #9341
    Gavalakis
    Keymaster

    Hello,

    No offense taken of course:)

    I agree with you. It’s a bit iconvenient. I will make the state name change when you select a nested BT instead of how it is now.

    Thanks for suggestions 🙂

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

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