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
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
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
playBackgroundMusic()
Plays the background music of this Ui.
stopBackgroundMusic()
Stops playing the background music of this Ui.