IN THIS ARTICLE
Creating Custom Nodes in Script Canvas
Creating custom nodes in Script Canvas offers you maximum control and flexibility with the functionality of the node. You might wish to create a custom node in the following scenarios:
- When your node has state, time, or latent results.
- When creating complex nodes.
- When you need control over the node’s topology.
- When you want to reflect your own C++ free functions.
To make the process of creating a custom node easier, Script Canvas uses a templated, automatic code generation system called AzAutoGen to significantly reduce the amount of “boilerplate code” you need to write just to get a node up and running. Using AzAutoGen allows the developer to immediately focus on the functionality of the new node, since the code required for the node to show up in the Node Palette is already there.
The following four steps are required to create a custom node:
- Create a code generation XML file.
- Create the C++ files for your node.
- Add these files to CMake.
- Register your new node.
For a better understanding of creating custom nodes, we recommend reading following
|Custom Nodeable Nodes
|How to create custom Script Canvas Nodeable Nodes in Open 3D Engine (O3DE).
|Custom Free Function Nodes
|How to create custom Script Canvas Free Function Nodes in Open 3D Engine (O3DE).
|Node Definition Reference
|Reference guide for Script Canvas node definitions.
|Dynamic Data Slots
|Use dynamic data slots to enable a single Script Canvas node to process a variety of data types in Open 3D Engine (O3DE).