Storyboard to Composer Migration

Type Library
Revision 2014.2524
Keywords storyboard, composer, migration

Overview

This guide aims to ease your migration from Storyboard to Composer.

Scene Events

In Composer, the scene event system has been simplified as follows:

New Functions

Changed Functions/Properties

storyboard.getCurrentSceneName()

Replaced by composer.getSceneName()composer.getSceneName( "current" ) or composer.getSceneName( "overlay" ).

storyboard.getPrevious()

Replaced by composer.getSceneName()composer.getSceneName( "previous" ).

storyboard.purgeScene()

Replaced by composer.removeScene()composer.removeScene( true ).

storyboard.purgeAll()

Replaced by composer.removeHidden()composer.removeHidden( true ).

storyboard.removeAll()

Replaced by composer.removeHidden()composer.removeHidden( false ).

storyboard.disableAutoPurge

Replaced by composer.recycleOnLowMemory. Default value is true. Change to false to disable auto-recycling.

Removed Functions/Events

storyboard.printMemUsage()

In place of this, you may check memory levels like this:

collectgarbage("collect")
local memUsage_str = string.format( "MEMORY= %.3f KB", collectgarbage( "count" ) )
print( memUsage_str .. " | TEXTURE= "..(system.getInfo("textureMemoryUsed")/1048576) )

scene:overlayEnded()