Skip to main content

Scripting Input Types

These are the basic property types usable in scripts with //@input. See also: Scripting Overview, Custom Script UI.

InputType
//@input SceneObjectSceneObject
//@input floatNumber
//@input intNumber
//@input boolBoolean
//@input vec2vec2
//@input vec3vec3
//@input vec4vec4
//@input mat2mat2
//@input mat3mat3
//@input mat4mat4
//@input quatquat
//@input stringString
//@input SceneObject[]SceneObject[]
//@input float[]Number[]
//@input bool[]Boolean[]
//@input int[]Number[]
//@input vec2[]vec2[]
//@input vec3[]vec3[]
//@input vec4[]vec4[]
//@input mat2[]mat2[]
//@input mat3[]mat3[]
//@input mat4[]mat4[]
//@input string[]String[]
//@input Object[]Object[]

Examples

In addition, Component types and Asset types can be used.

// Print a string property
//@input string myText

print('here is my string value: ' + script.myText);
// Print a string repeatedly

//@input string myText
//@input int numTimes

for (var i = 0; i < script.numTimes; i++) {
print(script.myText);
}
// Disable an object

//@input SceneObject targetObject

script.targetObject.enabled = false;
// Play a sound

//@input Component.AudioComponent audio

script.audio.play(-1);
Was this page helpful?
Yes
No

AI-Powered Search