Unity Loading Screen | Beginner Tutorial (2022)

preview_player
Показать описание
Learn how to design and implement a loading screen in Unity. Loading your scenes asynchronously can help reduce the time users have to wait between scenes but I'll teach you something that most tutorials don't even mention!

🎁 Get OVER 165+ Scripts, Projects and premium content on my PATREON HERE:

·························································································

🔥Unity Materials / Files & More:

🔥 UNITY SUBSCRIPTIONS:

·························································································

💰BIG DISCOUNTS on my website, for my UNITY ASSETS:

💬Join the Community Discord:

💝 Make a donation to the channel:

·························································································

⬇️ SpeedTutor Puzzle Assets:

⬇️ SpeedTutor Best Selling Assets:

⬇️SpeedTutor Model Packs:

My Assets include: Gas Mask, Flashlight, Generator, Themed Key , Padlock, Phone, Chess Puzzle, Lever, Valve Puzzle, Fuse Box & Safe Systems. Cardboard, Debris, Massive Models and more!

························································································

⭐ Connect with me:

·······················································································
#SpeedTutor #Unity #LoadingScreen
Рекомендации по теме
Комментарии
Автор

Slightly late upload today but here we are! Haha. I wanted to create this tutorial to give some good pointers to those who had struggled!

SpeedTutor
Автор

Interesting Tutorial.
So Far All My Loading Screens Have Been For "Set Up" After The Scene Loads But Before I Want The Player To Take Control.
Good To See how It's Made With The Scene.

viddarkking
Автор

my loading screen just flashes by it stays like for 1 second

fxhslvz
Автор

very usefull my game menu! Thx my friend.

gmangman
Автор

Im wondering if you might help me. Im learning and I have created a level select in my game like super Mario world. SO the character moves around the map and when it lands on a level square you hit space and the level load. Being that I'm not using BUTTONS how would I trigger the load screen with the example you showed here. Hope you can help me understand a bit more. THANK YOU

ordep
Автор

so there's no way to fix in editor?

Garfield_Minecraft
Автор

Amazing tutorial mate, I have just one question. When I implemented the loading bar into my game it goes from 0 to 34%, and then goes back to 22% and then freezes there and finally goes all the way to a 100% when the game is about to load. Is there anything you know I can do about it?

alejandro
Автор

will this work with photon 2.



this is by far the hardest thing ive added to my game and im not an amatuer.


however its multiplayer so networking may be an issue.

RHYSHALLDIGITALART
Автор

I was wondering if your routine will work with the initial loading of the game itself that takes 5 minutes before starting, or is it just for loading other levels while the game is running. If it doesn't work for game loading, do you have any information on how to do that? Thanks.

debmarkproductions
Автор

Hi the loading is awesome works fine but is there anyway to slow down the loading to at least like a minimum of 5secs cause the loading flashes before my eyes that I don't need the loading anymore. Anyways I'm working in a 2d game of course its lightweight anyways I run the the game in built version.

Justeeee
Автор

Can we remove unity loading screen in webgl can you make a video on this

khajanawaz
Автор

my loading screen just flashes by it stays like for 1 second and how to fix this like i want more longer 4-5 sec max

juniorski
Автор

where do you get the background to load the game?

alaxi-ball
Автор

And yet - the best loading screen is always the one, you don't need. Let's face it, bulk loading is always some kind of laziness. Not always avoidable, because setting up streaming is more work and needs more robust systems, but at the end, it is always technically possible. Simply look at lands of lore on the C64, which already streamed a whole open world on a 1Mhz machine with 64KB RAM and an ultra slow disk drive with 170KB. Eventually, we moved away from scenes anyway and use addressables instead, which give a much more grained control on loaded and unloaded assets.

SunSailor
Автор

I actually have a slight 'issue' with loading in my game. Perhaps you can help. I have an extra step nested in the while loop. This is the 'press to continue' code block (as I have a little story showing on my loading screen). Everything works as it should, but the thing is my loading bar is acting not as expected. It loads to about 6% normally, but then it stops showing the progression (percentage wise, the actual game is indeed still loading, but the player might think the game froze up), after a minute or so, it shoots up to 95/ 100 % and the press to continue can be done with space bar. I was hoping to see a somewhat more gradual loading progression from 0 to 100 with maybe some chunks loaded faster here and there. This is the code I'm using

public class LevelLoader : MonoBehaviour
{
[SerializeField] private int sceneToLoad;
[SerializeField] private Slider loadingBar;
[SerializeField] private TextMeshProUGUI percentageText;
[SerializeField] private GameObject loadingIcon;
[SerializeField] private TextMeshProUGUI pressContinue;




private void Start()
{
pressContinue.enabled = false;

LoadScene(sceneToLoad);
}

public void LoadScene(int sceneIndex)
{

}

IEnumerator LoadAsynchronously(int sceneIndex)
{
AsyncOperation operation =

loadingIcon.SetActive(true);

= false;

while (!operation.isDone)
{
float progress = / .9f);
loadingBar.value = progress;
percentageText.text = (progress * 100f).ToString("F0") + " %";


if (operation.progress >= .9f &&
{



pressContinue.enabled = true;

if
{
= true;
}
}

yield return null;
}
}
}

Is there something I can improve on?

vandermunnik
Автор

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class startScene : MonoBehaviour
{
public Slider loadingSlider;
public string sceneName;
public GameObject startButton;
bool loading;
AsyncOperation asyncOp;

public void startGame()
{

asyncOp =
loading = true;

}
void Update()
{
if(loading == true)
{
loadingSlider.value = asyncOp.progress;
if(asyncOp.progress >= 0.99f)
{
asyncOp.allowSceneActivation = true;
}
}
}
}

barzanfuntime
visit shbcf.ru