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 within the Ui 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()

Plays the background music of this Ui.

stopBackgroundMusic()

Stops playing the background music of this Ui.


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 within the Ui 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()

Plays the background music of this Ui.

↑ Back to top


stopBackgroundMusic()

Stops playing the background music of this Ui.

↑ Back to top

Did you find this page useful?

Please give it a rating:

Please provide some feedback!

This is very helpful to us.

Tell us how we can improve this post?