Code

../../../../_images/ui_comp_code.png

Attaches a C++ script to the object, giving it custom behavior.
An object can have several Code components to compose behavior from multiple small scripts.
For how scripts are written, see the Object-Scripts guide.

Options

Option

Description

Script

The script asset to attach. You can also drag a script from the file list onto this field.

Arguments

Any values the script exposes to the editor show up here, with an editor for each (number field, select-box, asset/object picker). A field is exposed by adding a [[P64::Name("...")]] attribute to a member of the script’s P64_DATA block (see Object-Scripts, including the [[P64::Bitmask(...)]] attribute for named bit flags).

See also