Grouped global blackboard parameters are not supported

NodeCanvas Forums Support Grouped global blackboard parameters are not supported

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #12479
    zsoik
    Participant

    We’ve grouped variables in global blackboards by using the forward slash as a group divider. This groups variables nicely in context menus etc. – But even though in the editor UI everything seems nice, I began noticing that at runtime, those variables won’t be resolved properly when bound to BBParameters in actions/conditions etc. I looked briefly into the code and discovered that everything part of the actual variable name after the forward slash will be discarded (So a variable GlobalCharacters/M10/Characters/Hans is resolved to the variable M10 in the GlobalCharacter blackboard instead of the variable M10/Characters/Hans).

    I (hopefully) fixed it (properly) by limiting the number of splits returned by the targetName.Split('/') invocation in BBParameter to two parts. So the other splits won’t be lost!

    #12490
    Gavalakis
    Keymaster

    Hey,

    The forward slash “/” is used to determine the path to a global blackboard, like for example “Global/MyFloat”. The first part of the split is used to determine the GlobalBlackboard name. I definitely wouldn’t recommend using “/” in variables names, because by doing so the variable will be treated as being part of a GlobalBlackboard and it won’t be resolved correctly in case it’s not. 🙂

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

    #12499
    zsoik
    Participant

    Yes, I already figured that out. It would work well if the other splits won’t be discarded:

    GlobalBB/My/Variable/Name => GlobalBB, My, Variable, Name => "My" in GlobalBB (Variable and Name are discarded in the current version).

    My hotfix just limited the number of splits to two:

    GlobalBB/My/Variable/Name => GlobalBB, My/Variable/Name => "My/Variable/Name" in GlobalBB

    If it isn’t supported, maybe a warning or error when trying to create such variables would be helpful. Unknowing designers will try 😉

    #12509
    Gavalakis
    Keymaster

    Hey,
    Sorry for the late reply.
    I will try your suggestion and if it does not create any complication or problems with the rest of the system I will add it 🙂
    Otherwise, yes; Probably adding a warning for that would be a good idea. : )

    Thanks once again for your input!

    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.