AgentType, RequireComponent for multiple components?

NodeCanvas Forums General Discussion AgentType, RequireComponent for multiple components?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9245

    So I have some custom actions which require both a Rigidbody and an Animator, so how should I go about expressing this in my action. As the AgentType normally infers the type shown on the UI I am not sure if I should be having multiple instances of this attribute, or if I should be using RequireComponent for it, as I do not know if NodeCanvas honours the RequireComponent attribute.

    Any advice would be great 🙂

    #9248

    Thinking about it I may also be able to get this functionality by using the GetFromAgent attribute on the components I need, as this will stop people using the action unless all those components are met right?

    #9247
    Gavalakis
    Keymaster

    You are very correct about the GetFromAgent, but still at the moment it’s not really that a good solution (user friendly-wise) because even though the initialization will fail, there is no relevant UI informing about the fact that this component is required.
    I could show up such a notification if a GetFromAgent is used.

    There is no other way right now to enforce more components on the agent.

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

    #9246

    ok thats cool, I can see it being useful for higher level composite behaviours, i.e movement and animation in the same behaviour.

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