- Home /
How do I make a level-to-level loading screen with bar?
So long story short, i'm new to scripting and cant find a script for a loading screen that doesn't use a button to work. I want to have the 'loading' scene separate from the levels so that i can make a bunch of copies with different titles. Can anyone help me make a script for loading the next levels with a loading bar that does not need a button to run?
Answer by Harinezumi · Jun 22, 2018 at 07:13 AM
Check out this tutorial, it explains the basics: https://www.youtube.com/watch?v=YMj2qPq9CP8
In short, create an empty scene, add an image component to the center and a text for the percentage (and optionally, a background image), and create a script that updates the text based on the load percentage (can be seen in the tutorial). When you want to load a level, you store the name of the level you want to load in this script (e.g. in a static variable), then switch to this almost empty loading scene, and load the level whose name you just gave it. And that's it.
Make sure you don't add too much stuff to the loading scene, or it will take too much time to switch to it and won't make any sense to have it.