Reply To: Request: Support for interfaces in generic actions

NodeCanvas Forums General Discussion Request: Support for interfaces in generic actions Reply To: Request: Support for interfaces in generic actions

#12621
Gavalakis
Keymaster

Hello,

Targeting interfaces is already possible, but as of now, it is done with a workaround and by using the special [AgentType] attribute. With that said, to support interfaces in the generic actions, all you have to do is please open up ActionTask.cs and change line #14..
From This:

To This:

With this change, then you will be able to do something like this:

It will also work in the inspector as usual 🙂
AgentTypeExample

(You can also do the same change in ConditionTask.cs if you want so).

This small change will also make it in the next version.
Let me know if that works for you.

Thanks.

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

Attachments:
  1. AgentTypeExample.png