Loading Bar For Each Canvas in a Scene
Is it possible too do this or even worth while to have a Loading Bar for each Camera and Canvas in a scene with lots of each?
I have a scene that has 8 Cameras assigned to 8 canvases each with panels, animations, sounds etcetera. Is it worth while to have another camera set as a loading screen that would show the progress of each camera scenario being loaded?
I thought it might be kind of a neat idea to have a loading screen with multiple loading bars but perhaps if they load super fast that this could be slowed down to some degree. I know that sounds kind of weird because usually you want things to load fast but my project is mostly GUI one big interactive user interface that is connected to an Arduino. So I was thinks of a way to make a "System Status" loading screen that showed the loading progress of each camera and canvas and each loading bar could be given a name and sound effects.
Answer by KdRWaylander · Dec 21, 2015 at 03:49 PM
Hi,
Since you would be adding this "System Status" Canvas in your scene ... when you'll see this canvas, it will mean that the others are loaded to, hence all the bars will be already full.
But i think i get your idea and here's a proposition:
start your scene on this "loading status" canvas
make loading bars with filled images (begin with fill ratio to 0)
animate or script (animate is definitly the best way) the fill ratio so it slowly raise to 100%
Now you have your bars filling up and you can decide/allow the user to switch to one of the 8 canvases whenever you want. Keep in mind that since everything is in the same scene, everything is already loaded, you just want to fake a loading process.
@$$anonymous$$dRWaylander, Thanks, I already have a scene like the one pictured here as a separate scene that pretty much does a "Fake" loading progress although I have the animations make it look like the bars are fluctuating. I was thinking of something more accurate but that could be slowed down just for aesthetic / visual purposes as like you say the scene would load, and does load pretty fast seeing as it's just one big series of canvas UI with panels and buttons and a number of slide in animated panels.
If you want to be accurate you have to async load your scene and use AsyncOperation.progress as fill ratio for your image. And don't forget to use AsyncOperation.allowSceneActivation to have total control on switching between scenes.
On way you could try would be (but it's definitly not perfect, especially if the scene loads in less than a frame):
store at each frame the value of AsyncOperation.progress
after loading is done, read one value of your progressValuesArray every 2 seconds or so and update the progress bar
I have heard about the AsyncOperation, I thought it did not work on the stand alone player and was only for the web player?
Your answer
Follow this Question
Related Questions
OnMouseDown work through UI elements 3 Answers
Trigger Canvas UI with Collider? C# Help! 1 Answer
Canvas not rendered by camera 1 Answer
Setting Sprite Rendered on UI 0 Answers