Documentation 📖

Your guide to using NodeCanvas in Unity

The Reflection Tasks

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:

  • Translate an object
  • Change an object’s name
  • Check if a CharacterController isGrounded
  • Check if a RigidBody isKinematic
  • Send a Message to a game object
  • Stop an AudioSource
  • Set an AudioSource’s volume
  • and so on…

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.

Actions

Execute Function

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.

Implemented Action

ImplementedAction

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:

Get Property

GetPropertyTask

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

Set Property

SetPropertyTask

Sets a static or instance property value.

Get Field

GetFieldTask

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

Set Field

SetFieldTask

Sets a static or instance field value.

Conditions

Check Function

CheckFunction

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

Check Property

CheckProperty

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

Check CSharp Event

CheckCSharpEvent

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.

Yes No
Last updated on April 4, 2025
Suggest Edit

© Paradox Notion 2014-2025. All rights reserved.