반응형
씬을 비동기 로딩하면서 progressbar 로 상태를 표시하고 싶을때 allowSceneActivation = false  로 

로딩할 씬이 실제 활성화 될때까지 기다리게 할 수 있고  AsyncOperation.progress 값이 0.9 가 될때

allowSceneActivation = true 로 변경하게되면 isDone 이 true 로 변경되며  AsyncOperation.progress 또한

1.0f 로 되어 비동기 로딩처리를 할 수 있다






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

When used in combination with LoadLevelAsync & LoadLevelAdditiveAsync 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.


ref : https://docs.unity3d.com/kr/current/ScriptReference/AsyncOperation-allowSceneActivation.html

반응형

+ Recent posts