feature suggestion – member access in references

NodeCanvas Forums General Discussion feature suggestion – member access in references

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #11521
    bcristian
    Participant

    Hello

    I think the ability to directly access members (fields or properties) of referenced values/objects would be a great addition and greatly simplify data-driven behaviors.
    With the current approach, one has to create actions to extract the value of fields/parameters into variables/parameters, then another action to use that value. This is unnecessary work, and clutters both the parameters list and the graph itself, which in turn is a potential source of errors.
    I suggest adding a member selector feature, i.e. when selecting a variable to reference in an action/condition it would be possible to drill down to the members defined in the type, recursively. Selecting array/collection members should also add the ability to specify a value/variable to use as index.
    Of course, this is a major feature, which would require more design (especially UI-wise), but I think would greatly enhance NodeCanvas. It would not only make accessing data easier, it would also directly remove the need for the current set of actions dedicated to accessing members.

    #11526
    Gavalakis
    Keymaster

    Hey,

    This kind of direct properties/fields approach is already possible for properties/fields of the agent gameobject’s components through the use of Data Bound Variables. I suppose you already know that though 🙂 and that you are referring to doing the same thing but for the variable references themselves instead.
    If so, I’m glad to tell you that this is already a planned feature and something I wanted to implement for a long time now.

    🙂

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

    #11527
    bcristian
    Participant

    Great, can’t wait for it, it will make my graphs so much neater.

    #12258
    triph
    Participant

    Has this been implemented?

    #12262
    Gavalakis
    Keymaster

    Hello,
    This feature is not yet implemented. The most important reason for that, is because implementing this feature will have a performance cost due to changes needed in how reflection works in NodeCanvas, while as it stands now reflection has no performance cost.
    Thanks.

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

    #12385
    mgb
    Participant

    +1 for this if poss! 🙂

    #12400
    Gavalakis
    Keymaster

    So, I have just moved this feature request higher in the priority list. To keep the performance as fast as possible for this though, there will be a limitation of only one depth level when the feature is implemented, like for example “myTransform.position”, “myClass.myProperty”, or “myVector3.x”.

    This will most probably not be there in the next version, but rather the one after that.
    Thanks!

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

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