Type Function Library composer.* Return value Table Revision 2018.3435 Keywords composer, scene, getScene
Returns the specified scene object, as returned from composer.newScene(). Returns
nil if the scene object does not exist. This function is useful for getting a reference to a specific scene object — for instance, if the current scene needs access to a specific function that's attached to another scene.
composer.getScene( sceneName )
String. The name of the scene object.
local composer = require( "composer" ) -- Get a reference to "titleScene" local titleScene = composer.getScene( "titleScene" ) -- Call the following function (defined in "titleScene.lua") titleScene.getUserPrefs()