About the Behavior Editor

To write or edit your scripts, you can add your JavaScript code (ECMAScript) in the Behavior Editor.

If you need information about JavaScript classes, methods, or attributes, you can use the JavaScript API guide. To open this guide in your web browser, click JavaScript API Guide from the Storytelling section of the action bar.

See Also
Creating Scripts

Each number identifies a specific area of the Behavior Editor. The table below describes these areas, their purpose, and features.


Number Feature Description
Script List

Lets you create and manage scripts.

Scripts get saved when you click outside the editor to change the focus.

Color coding indicates the status of each script:

  • Red: Your script gets saved but contains syntactical errors.
  • Orange: Any modification to the script remains unsaved because the editor gets the focus. Your script might have errors.
  • Green: Your script gets saved. The Behavior Editor detects no error.

If your experience contains scenes, you can right-click the script list and select Used by. This enables you to view the scenes that include the current script.

Editor Area Defines the area where you edit your code.
  • The Ask AURA AI-based feature lets you generate code from your own prompts or based on the contextual analysis of your script.

    Relying on the JavaScript SDK documentation, this feature helps you to quickly structure a comprehensive, coherent, and cohesive script that suits the intent of your experience. For more information, see About AI Code Generation in Scripts and Scripting Using AI Code Generation.

  • The Command Palette lets you access various internal commands available in the editor. These commands provide you with many shortcuts that facilitate your script production and navigation.
Notes:
  • Your code gets automatically saved.
  • The Behavior Editor detects errors in your code automatically.
Resources Provides you with features additional resource to manage your script and useful documentation.
  • The Search command lets you search and replace items in the editor.
  • The Open JavaScript API Guide opens the JavaScript API guide in a web browser.
  • The Maximize command enlarges or reduces the Behavior Editor window.

For more information, see the Visual Studio Code guide.

Minimap Provides an overview of your code.
Tip: Scroll the minimap to view specific code blocks in the editor.
Capacities Lets you create and edit your own capacities and properties.

For more information, see Managing Capacities.