Reply To: Request: Support for interfaces in generic actions

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

#13850
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 🙂
    [attachment file=”AgentTypeExample.png”]

    (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.