Reputation: 9
I want to create a button which loads the scene as well as shows the loading progress bar. How to do this? Thank You !
Upvotes: 0
Views: 2429
Reputation: 21
You can use above mention method or below simple method
You can use Scrollbar of Unity UI and one background texture. Just make value =0 and Size =0.5 and load your scene , and when scene is loaded make size 1 and disable Scrollbar and background texture. :-)
Upvotes: 0
Reputation: 1825
You need to know how to use Co routine for this to work. Because you will use LoadLevelAsync, which will run your Co routine call together with the LoadLevelAsync. So while loading, your call for the Progress bar will check the current progress and have a boolean check if the Load is complete.
Using the new UI scroll bar for loading is easier but it I would need to in form you the step by step to set it up, cause it is mainly an editor set up rather than code. So I will redirect you to the old GUI function which takes care of it. This has been answered in Unity3d Answer page already.
http://answers.unity3d.com/questions/457594/how-to-make-a-progress-bar-for-loading-next-scene.html
Upvotes: 0