title | description | weight |
---|---|---|
Using Script Events in Script Canvas |
Learn how to use script events with Script Canvas in Open 3D Engine (O3DE). |
200 |
Script Canvas scans for and detects script event assets, so after you define a script event, you can use it in Script Canvas.
Script event assets appear by default in the Script Events category in the Script Canvas Editor Node Palette.
{{< note >}}
To change the name of the category, open the script event's asset definition in the Asset Editor and edit the Category
property.
{{< /note >}}
You can send an event by adding a Send method_name node to a Script Canvas graph.
To send an event
-
Drag and drop the method that you want to send onto the Script Canvas graph.
-
In the context menu, choose Send method_name.
A method send node is added to the graph.
-
Connect this node to the appropriate logic and data inputs. When the Script Canvas graph runs, it sends the event to the entities or systems to which the node is connected.
You can handle an event by adding a Receive method_name node to a Script Canvas graph.
To handle an event