Version: 2017.3 (switch to 2017.4)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

SceneManager.activeSceneChanged

Parameters

value Previous active scene and the new active scene.

Description

Subscribe to this event to get notified when the active Scene has changed.

This script added to activeSceneChanged takes two hidden arguments. These are the replaced Scene and the next Scene. The arguments are not visible.

In the Editor this event is sent only in Play mode (not in Edit mode). If the event is needed for Edit mode then use EditorSceneManager.activeSceneChanged.

no example available in JavaScript

ScriptExample2 simply announces that this is the active scene.

no example available in JavaScript

Did you find this page useful? Please give it a rating: