Skip to content

SceneEntry

The SceneEntry class represents an entry in the scene management system, providing methods to control the loading, unloading, activation, and deactivation of a specific scene. Typical use cases include managing multiple levels in games, switching between different views in complex applications, and dynamically loading/unloading content based on user interactions or gameplay progression.

Usage

To use this class, add the following require at the top of your script:

local SceneEntry = require 'engine/sceneentry'

Reference

load

load()

Load the scene

unload

unload()

Unload the scene

activate

activate()

Activate the scene, meaning it will be rendered

deactivate

deactivate()

Deactivate the scene, meaning it will not be rendered anymore

setActivated

setActivated(value)

Set the activation state of the scene. An active scene will be rendered, an inactive one won't

Parameters

  • value (boolean): true or false

setLoaded

setLoaded(value)

Set the loading state of the scene. An unloaded scene will not be rendered and freed from memory

Parameters

  • value (boolean): true or false

isActive

isActive()

Returns the activation state of the scene

Returns

  • boolean: state

isLoaded

isLoaded()

Returns the loading state of the scene

Returns

  • boolean: state