Reply To: Custom Action scripting – agent is null

NodeCanvas Forums Support Custom Action scripting – agent is null Reply To: Custom Action scripting – agent is null

#17897
Gavalakis
Keymaster

Hello there,

Please use a ‘Component’ derived type as the generic argument of ActionTask<T>. GameObject type is not supported there, so the ‘Transform’ type is best to be used there for a gameobject (since all gameobjects have a Transform 🙂 ). Alternatively you could also use an interface type for the generic argument (this is why there is no restriction for components only types on the argument).

Let me know if that works for you.

Here are a couple more docs for creating Tasks by the way:

nodecanvas.paradoxnotion.com/documentation/?section=creating-custom-tasks
nodecanvas.paradoxnotion.com/documentation/?section=using-task-attributes
nodecanvas.paradoxnotion.com/documentation/?section=using-bbparameters-in-tasks
nodecanvas.paradoxnotion.com/documentation/?section=creating-generic-tasks

Cheers!

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