NodeCanvas comes with various Tasks that allow you to make use of existing code and components on game objects, that are well worth mentioning. By using these Tasks a whole lot of different actions can be performed that at the first glance you might think they are missing. Here are a few things that can be done for example by using these Tasks:
Furthermore you can keep all your implementations in your own scripts instead of creating custom action and condition tasks, and use these Tasks to interact with them in an efficient way. Following are the Reflection Tasks included.
Executes a static or instance function of up to six parameters and save the return value of that function to a blackboard variable. The parameters of the function can either be directly assigned or be linked to blackboard variables.
This action ends immediately in Success unless the function selected is an IEnumerator in which case it will be executed as a coroutine. In this case, the action will be running and only return Success after the coroutine is finished.

Forwards the execution of the task to a function on a script attached to the agent. That function must have a signature of public Status and take one or no parameters. For example:
1 2 3 4 5 6 7 8 9 10 | using NodeCanvas.Framework; public class Example : MonoBehaviour { public Status SomeAction(string text){ Debug.Log(text); return Status.Success; } } |

Gets a static or instance property value and store that property value to a blackboard variable.

Sets a static or instance property value.

Gets a static or instance field value and store its value on a blackboard variable.

Sets a static or instance field value.

Call a non-void static or instance function of up to six parameters and check it directly against a given value.

Checks a static or instance property against a given value, saving you from having to first get it and then check it.

This condition can be used to subscribe to an event of System.Action type or custom handler with 0 arguments and return type of void. As soon as the event is raised this condition will return true for one frame.
© Paradox Notion 2014-2025. All rights reserved.