Legacy Documentation: Version 5.5
LanguageEnglish
  • C#
  • JS

Script language

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

AsyncOperation.allowSceneActivation

public bool allowSceneActivation;

Description

Allow scenes to be activated as soon as it is ready.

When used in combination with LoadLevelAsync & LoadLevelAsyncAdditive it allows you to delay the actual activation of the scene. (And unloading of the previous scene).

When allowSceneActivation is set to false then progress is stopped at 0.9. The isDone is then maintained at false. When allowSceneActivation is set to true isDone can complete.