Create a new ScriptAttributes instance.
Script Type that attributes relate to.
Add Attribute.
Name of an attribute.
Object with Arguments for an attribute.
Optional
args.default?: anyOptional
array?: booleanIf attribute can hold single or multiple values.
Optional
assetType?: stringName of asset type to be used in 'asset' type attribute picker in Editor's UI, defaults to '*' (all).
Optional
color?: 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.
Optional
curves?: string[]List of names for Curves for field type 'curve'.
Optional
description?: stringDescription for Editor's for field UI.
Optional
enum?: object[]List of fixed choices for field, defined as array of objects, where key in object is a title of an option.
Optional
max?: numberMaximum value for type 'number', if max and min defined, slider will be rendered in Editor's UI.
Optional
min?: numberMinimum value for type 'number', if max and min defined, slider will be rendered in Editor's UI.
Optional
placeholder?: string | string[]Placeholder for Editor's for field UI. For multi-field types, such as vec2, vec3, and others use array of strings.
Optional
precision?: numberLevel of precision for field type 'number' with floating values.
Optional
schema?: object[]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.
Optional
size?: numberIf attribute is array, maximum number of values can be set.
Optional
step?: numberStep value for type 'number'. The amount used to increment the value when using the arrow keys in the Editor's UI.
Optional
title?: stringTitle for Editor's for field UI.
Type of an attribute value. Can be:
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.