How to Create A Loading Scene in Unity
Unity makes it simpler than you might think
Load screens have always been kind of an enigma to me. Like what is actually going on under the hood. Are there a bunch of Gremlins running around dropping game assets into place? Well it turns out that, in Unity at least, the answer is much more straight forward.
First we need to create a new scene in Unity, much like a main menu this scene is all UI elements on the canvas. The load bar which used to seem like some kind of magic to me is actually just a really simple UI trick.
In the load scene above there are 3 Images on the canvas. The background which is most of what you see. The yellow load progress bar and the red splatter overlay on top of the yellow.
Only the yellow bar is animated, using the Image controls inside the inspector. We make four (4) changes to the default image. Image type is changed to filled, fill method is set to horizontal, fill origin is set to left and we adjust the fill amount in code.