composer.recycleOnSceneChange

Type Boolean
Library composer.*
Return value Boolean
Revision Release 2024.3703
Keywords composer, scene, recycle, recycleOnSceneChange
See also composer.removeScene()

Overview

By default, when changing scenes, Composer keeps the current scene's view (self.view) in memory, which can improve performance if you access the same scenes frequently. If you set composer.recycleOnSceneChange to true, the scene's self.view display group will be removed, but its scene object will remain in memory. The default value is false.

Syntax

composer.recycleOnSceneChange

Example

-- Enable auto-recycle on scene change
composer.recycleOnSceneChange = true