Ui

Function Description
camera()

Returns the Ui’s Camera object. The Ui has an independent camera from the 3D world it’s attached to. It’s recommended to only use the Ui’s Camera for things like screenToWorld() (See the Camera API for more info).

create(name, parent)

Create a new Entity based on the given asset name. A parent entity can be passed optionally.

find(name)

Returns the array of Entities, Buttons, or Images with the specified name.

playBackgroundMusic(name)

Plays the background music with the given name.

stopBackgroundMusic(name)

Stops playing the background music with the given name.


camera()

Returns the Ui’s Camera object. The Ui has an independent camera from the 3D world it’s attached to. It’s recommended to only use the Ui’s Camera for things like screenToWorld() (See the Camera API for more info).

Returns

Camera the Ui’s Camera object

↑ Back to top


create(name, parent)

Create a new Entity based on the given asset name. A parent entity can be passed optionally.

Parameters

string name – the asset the new Entity should contain Entity parent (optional) the parent of the newly created Entity

↑ Back to top


find(name)

Returns the array of Entities, Buttons, or Images with the specified name.

Parameters

string name – the name of the objects you wish to find

Returns

array the array of Ui objects with the specified name

↑ Back to top


playBackgroundMusic(name)

Plays the background music with the given name.

Parameters

string name – the name of the music to play

↑ Back to top


stopBackgroundMusic(name)

Stops playing the background music with the given name.

Parameters

string name – the name of the music to stop playing

↑ Back to top

Did you find this page useful?

Please give it a rating:

Please provide some feedback!

This is very helpful to us.