Skip to content

Project

The Project module offers essential functions to interact with project settings and manage scenes within a Lua environment.

Usage

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

local Project = require 'engine/project'

Reference

getScenes

static getScenes()

Get a list of all the scenes in the project

Returns

  • table: of SceneEntry objects

getSceneByName

static getSceneByName(name)

Get a scene by its item name

Parameters

  • name (string): name of the scene's item

Returns

  • SceneEntry: scene entry object if the scene was found or nil

getGravity

static getGravity()

Get the physics engine gravity vector for the project

Returns

  • Vector3: vector

setGravity

static setGravity(value)

Set the physics engine gravity value in the project

Parameters

  • value (Vector3): the gravity