composer.getSceneName()

Type Function
Library composer.*
Return value String
Revision 2017.3060
Keywords composer, scene, getSceneName
See also composer.gotoScene()
composer.removeScene()

Overview

Returns the current, previous, or overlay scene name as a string. This can then be used with composer.gotoScene() or composer.removeScene().

Syntax

composer.getSceneName( sceneType )
sceneType (required)

String. The name of the scene you want to retrieve. Possible values are "current", "previous", or "overlay".

Examples

local prevScene = composer.getSceneName( "previous" )

-- Later...
composer.gotoScene( prevScene )
local currScene = composer.getSceneName( "current" )

composer.removeScene( currScene )