Destroy on Unload


The DestroyOnUnload value controls whether music files are destroyed when the Screen is destroyed. This value can be set to false if you want the song to continue playing into the next Screen. For this to occur, the Screen which you are transitioning into must also have a reference to the same Song file.

Example Implementation

To add a song that plays on two screens:

  1. Create two screens (such as GameScreen and PostGameScreen)

  2. Drag+drop a .mp3 or .wma file into GameScreen

  3. Write custom code in your game to transition between the two Screens - notice that the song continues to play despite the transition.

Things to remember:

  • You do not need to manually play Songs that have been added to Screens through Glue. Doing so may make your song restart.

Last updated