Create a new ScriptAttributes instance.
Script Type that attributes relate to.
Add Attribute.
Name of an attribute.
Object with Arguments for an attribute.
Optionalarray?: booleanIf attribute can hold single or multiple values.
OptionalassetType?: stringName of asset type to be used in 'asset' type attribute picker in Editor's UI, defaults to '*' (all).
Optionalcolor?: stringString of color channels for Curves for field type 'curve',
can be any combination of rgba characters. Defining this property will render Gradient in
Editor's field UI.
Optionalcurves?: string[]List of names for Curves for field type 'curve'.
Optionaldefault?: anyDefault attribute value.
Optionaldescription?: stringDescription for Editor's for field UI.
Optionalenum?: any[]List of fixed choices for field, defined as array of objects, where key in object is a title of an option.
Optionalmax?: numberMaximum value for type 'number', if max and min defined, slider will be rendered in Editor's UI.
Optionalmin?: numberMinimum value for type 'number', if max and min defined, slider will be rendered in Editor's UI.
Optionalplaceholder?: string | string[]Placeholder for Editor's for field UI. For multi-field types, such as vec2, vec3, and others use array of strings.
Optionalprecision?: numberLevel of precision for field type 'number' with floating values.
Optionalschema?: any[]List of attributes for type 'json'. Each attribute description is an object with the same properties as regular script attributes but with an added 'name' field to specify the name of each attribute in the JSON.
Optionalsize?: numberIf attribute is array, maximum number of values can be set.
Optionalstep?: numberStep value for type 'number'. The amount used to increment the value when using the arrow keys in the Editor's UI.
Optionaltitle?: stringTitle for Editor's for field UI.
Type of an attribute value. Can be:
Get object with attribute arguments. Note: Changing argument properties will not affect existing Script Instances.
Name of an attribute.
Arguments with attribute properties.
Container of Script Attribute definitions. Implements an interface to add/remove attributes and store their definition for a ScriptType. Note: An instance of ScriptAttributes is created automatically by each ScriptType.