Built-in Commands

General Commands

Get

(g)
pattern

Alias: g

Get the value of the given property. Can be used with most gameObject properties, component properties, and some statics including: Application, Time, Physics, Screen, AudioSettings, QualitySettings, Input, Physics2D.

Parameters:

pattern: String

> g cube*.transform.position
Cube1 [123] [1, 2, 3]
Cube2 [456] [1, 2, 3]
Cube3 [789] [1, 2, 3]

Set

(s)
property
value

Alias: s

Set the value of the given property. Can be used with most gameObject properties, component properties, and some statics including: Application, Time, Physics, Screen, AudioSettings, QualitySettings, Input, Physics2D.

Parameters:

property: String

value: Object

> s cube*.transform.position [1, 2, 3]
Set Cube1 [123] to [1, 2, 3]
Set Cube2 [456] to [1, 2, 3]
Set Cube3 [789] to [1, 2, 3]

Scene Commands

Load

(ld)
sceneOrIndex
(additive)

Alias: ld

Load scene by name or build index. If additive is true, the scene is added to the current scene.

Parameters:

sceneOrIndex: String

additive: Boolean (Default: false)

> ld SampleScene
Loading scene SampleScene.

Unload

(ul)
sceneOrIndex

Alias: ul

Unload scene by name or build index.

Parameters:

sceneOrIndex: String

> ul SampleScene
Unloading scene SampleScene.

GameObject Commands

AddComponent

(ac)
name
component

Alias: ac

Add the component to all gameObjects with the given name.

Parameters:

name: String

component: String

> ac cube* Rigidbody
Added Rigidbody to Cube1 [123]
Added Rigidbody to Cube2 [456]
Added Rigidbody to Cube3 [789]

Destroy

(x)
name

Alias: x

Destroy all game objects with the given name.

Parameters:

name: String

> x cube*
Destroyed Cube1 [123]
Destroyed Cube2 [456]
Destroyed Cube3 [789]

Disable

(d)
name

Alias: d

Disable the given gameObjects.

Parameters:

name: String

> d cube*
Disabled Cube1 [123]
Disabled Cube2 [456]
Disabled Cube3 [789]

Enable

(e)
name

Alias: e

Enable the given gameObjects.

Parameters:

name: String

> e cube*
Enabled Cube1 [123]
Enabled Cube2 [456]
Enabled Cube3 [789]

GetComponents

(comp)
name

Alias: comp

Get the components of the given gameObjects.

Parameters:

name: String

> comp cube1
Cube1 [123] Components:
Transform
MeshFilter
MeshRenderer

Instantiate

(i)
prefabName
(position)
(rotation)
(parent)

Alias: i

Instantiate a prefab by name with optional position, rotation, and parent transform.

Parameters:

prefabName: String

position: Vector3 (Default: [0,0,0])

rotation: Quaternion (Default: [0,0,0])

parent: Transform (Default: null)

> i SamplePrefab [0, 1, 0] [0, 45, 0] cube.transform
Instantiated SamplePrefab(Clone) [123].

List

(ls)
(name)

Alias: ls

List all game objects with the given name.

Parameters:

name: String (Default: *)

> ls cube*
Cube1 [123]
Cube2 [456]
Cube3 [789]

LookAt

(lk)
name
(target)
(worldUp)

Alias: lk

Look at the given target.

Parameters:

name: String

target: Vector3 (Default: [0,0,0])

worldUp: Vector3 (Default: [0,0,0])

> lk cube* player1.transform.position
Rotated Cube1 [123] to [0, 1, 0]
Rotated Cube2 [456] to [0, 1, 0]
Rotated Cube3 [789] to [0, 1, 0]

Move

(mv)
name
(position)
(local)

Alias: mv

Move all game objects with the given name to the given position.

Parameters:

name: String

position: Vector3 (Default: [0,0,0])

local: Boolean (Default: false)

> mv cube* [0, 1, 0]
Moved Cube1 [123] to [0, 1, 0]
Moved Cube2 [456] to [0, 1, 0]
Moved Cube3 [789] to [0, 1, 0]

RemoveComponent

(rc)
name
component

Alias: rc

Remove the component from all gameObjects with the given name.

Parameters:

name: String

component: String

> rc cube* Rigidbody
Removed Rigidbody from Cube1 [123]
Removed Rigidbody from Cube2 [456]
Removed Rigidbody from Cube3 [789]

Rotate

(rt)
name
(rotation)
(local)

Alias: rt

Rotate all game objects with the given name to the given rotation.

Parameters:

name: String

rotation: Quaternion (Default: [0,0,0])

local: Boolean (Default: false)

> rt cube* [0, 45, 0]
Rotated Cube1 [123] to [0, 45, 0]
Rotated Cube2 [456] to [0, 45, 0]
Rotated Cube3 [789] to [0, 45, 0]

Scale

(sc)
name
(scale)

Alias: sc

Scale all game objects with the given name to the given scale.

Parameters:

name: String

scale: Vector3 (Default: [0,0,0])

> sc cube* [2, 2, 2]
Scaled Cube1 [123] to [2, 2, 2]
Scaled Cube2 [456] to [2, 2, 2]
Scaled Cube3 [789] to [2, 2, 2]

SendMessage

(sm)
name
method

Alias: sm

Call a method on all gameObjects with the given name using SendMessage.

Parameters:

name: String

method: String

> sm cube* OnHit
Sent message OnHit to Cube1 [123]
Sent message OnHit to Cube2 [456]
Sent message OnHit to Cube3 [789]