Question by
chelder · Jun 22, 2016 at 05:49 PM ·
scene-loadingloadingitweenfade
iTween: show a loading text right after CameraFadeTo has turned the screen black
The following code is working a fade to black right before loading the next scene:
private void BeforeLoadScene(){
//Make a default black color fade
iTween.CameraFadeAdd();
//Fade to black and call a function to load the next scene right after finish:
iTween.CameraFadeTo(iTween.Hash("amount",.5,"onComplete","LoadScene","onCompleteTarget",gameObject));
}
private void LoadScene(){
UnityEngine.SceneManagement.SceneManager.LoadScene (0);
}
The issue is that it takes around 4 seconds to load the next scene. Meanwhile everything is black, so it could seem the game has crashed. How would you show a "Loading" text right after. Maybe "disabling" some how CameraFadeTo, delete all the gameobjects in the scene but the camera and a game object showing the text? Any better idea?
Comment
Your answer
