Skip to main content
There are two ways to create a new script, from the Assets Panel and with the Scripting tool.

Creating a Script from the Assets Panel

  1. In the Assets Panel, click the + button.
  2. Choose Script and select the type of script you’d like to create.
Create Script from Assets Panel

Creating a Script with the Scripts Tool

  1. Select the dropdown icon next to the Script button in the Toolbar
  2. Select the type of script you’d like to create.
Create Script from Assets Panel New scripts are saved as Assets and can be found in the Assets Panel.
Use PascalCase for script names and update the script’s type name accordingly.Example: If the script is named MyConverter, the main type should also be named MyConverter.

Adding Scripts to Your Scene

To run Node and Layout scripts, they need to be added to the scene.
  1. Right-click the artboard you’d like to add your script to and select your script from the menu
  2. Position the script object, keeping in mind that the script’s position will determine where it’s rendered
  3. Select the group to set inputs (See Script Inputs)
Create Script from Assets Panel
Troubleshooting: If you don’t see your script in the list:
  1. Make sure your script is in the Assets Panel.
  2. Check the Problems Panel for issues.
  3. Make sure your script returns a function that returns a table with at least an init and draw function.