Loading Screen with Progress Bar | Unity Quick Tutorial

Loading Screen with Progress Bar | Unity Quick Tutorial

Abhinav a.k.a Demkeys

8 лет назад

34,963 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@zainulabdeen1469
@zainulabdeen1469 - 31.08.2018 10:34

great tutorial brother . you could be a very good teacher . with good resources you can compete brackey's.

Ответить
@adibmukhlis5256
@adibmukhlis5256 - 24.03.2018 19:09

Nice tut...love the explaination...Great work

Ответить
@symbolgames1670
@symbolgames1670 - 13.02.2018 01:30

it made my computer crash everytime I tried to press play.

Ответить
@andresurrea7587
@andresurrea7587 - 13.01.2018 20:16

Very well explained!! Thank you

Ответить
@westernbrosgaming4654
@westernbrosgaming4654 - 07.01.2018 06:33

it was a little fast for me but good job on the video!

Ответить
@VinAvs
@VinAvs - 27.11.2017 14:43

That's really helping. Thank You so much !

Ответить
@benedekbalogh2422
@benedekbalogh2422 - 11.10.2017 16:02

You sir made it pretty clear and straight. Your speed is just perfect, worth every second to watch!

Ответить
@skyhaihai4436
@skyhaihai4436 - 10.10.2017 03:02

if you double the speed you will learn how to make this loading bar in 10 mins wow

Ответить
@MrLife4sin
@MrLife4sin - 05.10.2017 17:06

Loved it. Fast, on point, no bullshit. Thanks!

Ответить
@Gann4Games
@Gann4Games - 13.08.2017 00:58

Speed, useful, clear, i love this tutorial!
Thank you! I've looking for something like this a long while!

Ответить
@EtherasFox
@EtherasFox - 31.07.2017 04:28

Hi. Might be a dumb question, but what does "isDone()" mean?

Does that mean everything on that scene has finished Start, or does that mean its just completed Awake? Or does that mean everything is on its first loop through Update (etc)

Ответить
@snowmansolution1216
@snowmansolution1216 - 25.06.2017 15:46

How do you disable?

Ответить
@SuzukiT
@SuzukiT - 23.06.2017 20:50

you work at insomniac?

Ответить
@antonstechman4119
@antonstechman4119 - 23.06.2017 08:39

Excellent tutorial, straight to the point, clear and easy to understand

Ответить
@okki1982
@okki1982 - 25.04.2017 14:41

very useful.THX!!

Ответить
@MintyFishy
@MintyFishy - 04.04.2017 08:48

I have a problem I followed every step and my game wont load. I dont know how you called the game scene when you clicked Level 1. Mine just keep cycling back to loading screen and nothing happens.

Ответить
@gozesim6505
@gozesim6505 - 03.04.2017 21:41

Thanks it's helpful for me

Ответить
@MakotoIchinose
@MakotoIchinose - 29.03.2017 16:19

So I've eliminated the "Press <any key> to continue" function to load the scene immediately when the fake/timed bar is full, but I got the WHILE function for the condition where the value equals to 1, is looping infinitely, causes Unity to load the scene many many times, until the computer hangs due to memory overload.

To fix that, simply change the WHILE statement into IF statement, so then Unity will load the scene once right after the loading bar is full.
The code should be like this:
if(progressBar.value == 1f)
{
SceneManager.LoadScene(scene);
}

Hope this helps!

Ответить
@glendi2886
@glendi2886 - 20.03.2017 18:56

Well done and thank you! I hope you still continue doing Unity related things!

Ответить
@DoubleBob
@DoubleBob - 08.03.2017 20:40

Most of your points are irrelevant! Content quality > Content quantity.

Ответить
@45CDOFordy
@45CDOFordy - 27.02.2017 04:14

Hi, i have an issue where the progressbar/slider isnt moving and the level wont load.

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

public class LoadinBarScript04 : MonoBehaviour
{

AsyncOperation ao;
public GameObject LoadingScreenBG;
public Slider ProgressBar;
public Text LoadingText;

public bool isFakeLoadingBar = false;
public float fakeIncrement = 0f;
public float fakeTiming = 0f;


// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {

}

public void LoadLevel()
{
LoadingScreenBG.SetActive(true);
ProgressBar.gameObject.SetActive(true);
LoadingText.gameObject.SetActive(true);
LoadingText.text = "L O A D I N G . . .";

if(!isFakeLoadingBar)
{
StartCoroutine(LoadLevelWithRealProgress());
}
else
{

}

}

IEnumerator LoadLevelWithRealProgress()
{
yield return new WaitForSeconds(1);

ao = SceneManager.LoadSceneAsync("Tutorial");
ao.allowSceneActivation = false;

while(!ao.isDone)
{

ProgressBar.value = ao.progress;


if(ao.progress == 0.9f)
{
ProgressBar.value = 1f;
LoadingText.text = "Press 'F' To Continue";
if(Input.GetKeyDown(KeyCode.F))
{
ao.allowSceneActivation = true;
}
}
}

Debug.Log(ao.progress);
yield return null;
}

IEnumerator LoadLevelWithFakeProgress()
{
yield return new WaitForSeconds(1);

while(ProgressBar.value != 1f)
{
ProgressBar.value += fakeIncrement;
yield return new WaitForSeconds(fakeTiming);
}

while(ProgressBar.value == 1f)
{
LoadingText.text = "Press 'F' To Continue";
if(Input.GetKeyDown(KeyCode.F))
{
SceneManager.LoadScene("Tutorial");
}
yield return null;
}
}


}

Ответить
@808CaptainMorgan
@808CaptainMorgan - 25.02.2017 12:25

Love the speed teach

Ответить
@calebjohnson287
@calebjohnson287 - 21.02.2017 23:00

you suck it didnt work at all

Ответить
@SargeOrona
@SargeOrona - 17.02.2017 01:34

For some reason it doesnt work on mine, when the progBar finishes and you get the "Press F to continue", only after the user presses F, the real loading happens, hence, the game looks frozen..

Ответить
@fisslewine1222
@fisslewine1222 - 16.02.2017 21:27

What about a circular progress bar?

Ответить
@piflyon
@piflyon - 15.02.2017 02:21

Fast and clear. Perfect. Thank you !

Ответить
@21TwoOneBe
@21TwoOneBe - 29.01.2017 02:56

Nice tutorial thumbs up !!

Have 2 small questions

1. When I start my intro and then install the Progressbar, it is possible to load it from (1) scene intro to (2) LoadingScene automatically and when it loads automatically loads the (3) MainMenu scene?

2. If I activate fake loading bar I can stop the slider with the mouse and push back :-) how can I prevent this?

Ответить
@BaldsBlag
@BaldsBlag - 19.01.2017 10:52

How to disable the elements? im just a beginner from this time. This is my Day2 in studying unity. Thanks

Ответить
@christiannoelflorendo1676
@christiannoelflorendo1676 - 14.01.2017 21:22

i copy the exact codes but why there is an error? invalid token '(' etc...

Ответить
@miraclekidzz354
@miraclekidzz354 - 10.01.2017 21:40

fucking quick. soooo quiiiiiiiiiiiiickkk :'@

Ответить
@abedalhmedbadr982
@abedalhmedbadr982 - 30.12.2016 19:10

why caravans? what hes work ?!

Ответить
@drtonyburns7321
@drtonyburns7321 - 24.12.2016 12:41

Very good speed tut.

Ответить
@wanderstudi
@wanderstudi - 12.12.2016 12:53

Thanks, very useful!

Ответить
@tomtubio655
@tomtubio655 - 08.12.2016 04:18

NullReferenceException: Object reference not set to an instance of an object
progbar+<loadlevelwithrealprogress>c__Iterator0.MoveNext () (at Assets/progbar.cs:53



please help

Ответить
@007belon
@007belon - 01.12.2016 00:31

very good video thank you !
can you make a video or tell me how to do same loading screen but with several levels ?
i maked this one but i dont know if there is another simple way.
i used playerprefs for save the name of level and used in the LoadSceneAsync
like this one
PlayerPrefs.SetString("LoadLevelScreen", "Level10");
SceneName = PlayerPrefs.GetString("LoadLevelScreen");
ao = SceneManager.LoadSceneAsync(SceneName);

it works good but i dont know this the best way or there is another simple way

Ответить
@BradyLovesPhysics
@BradyLovesPhysics - 30.11.2016 15:48

Brilliant. This helped me out a lot in a project. I appreciate the video.
Subbed && Liked.

Ответить
@TheStefanwillems
@TheStefanwillems - 23.11.2016 15:50

thanks for the tutorial! good tempo!

only downside....
i got an error. did exactly the same as u did

here is the error:
NullReferenceException: Object reference not set to an instance of an object
loadingbar+<LoadLevelWithRealProgress>c__Iterator0.MoveNext () (at Assets/loadingbar.cs:50)
UnityEngine.SetupCoroutine.InvokeMoveNext (IEnumerator enumerator, IntPtr returnValueAddress) (at C:/buildslave/unity/build/Runtime/Export/Coroutines.cs:17)

Ответить
@oandam8321
@oandam8321 - 21.11.2016 20:38

Doesnt work

Ответить
@MaherDaaloul
@MaherDaaloul - 09.10.2016 23:50

Great tutorial, extremely fast paced, which make it more enjoyable to follow. I'm making a game for android device, I followed your tutorial for the loading screen, I adapted it a little bit because I'm dealing with a touch screen device so no keyboard to press F, I just added an extra button, any how, every thing works BUT! still it hangs for 10 to 12seconds after I touch the button(in your tutorial the F keyboard button) to activate the loaded scene, after that the game start normally, is there a way to put a bar progress during that time while waiting for the activation of the scene? again thanks a lot for this great tutorial.

Ответить
@kevinamoin7652
@kevinamoin7652 - 22.09.2016 21:19

LoadSceneAsync does not contain from SceneManagement what is the updated please help Im a beginner :'(

Ответить
@simonmartens1445
@simonmartens1445 - 18.09.2016 13:41

Perfect speed, and easy to follow.

Ответить
@malditomausunrealrender3683
@malditomausunrealrender3683 - 14.09.2016 19:20

Great tutorial! Very very helpful. Thank you very much.

Ответить
@yeisonchipud2384
@yeisonchipud2384 - 05.09.2016 20:24

Good tutorial men, but you are going so fast. Thanks

Ответить
@MultiCreeperhunters
@MultiCreeperhunters - 31.08.2016 23:18

+sub

Ответить
@JasonSic113
@JasonSic113 - 18.08.2016 23:04

What is the purpose of a fake loading bar?

Ответить
@warrenwheeler7304
@warrenwheeler7304 - 22.07.2016 01:53

When I play the project, it doesn't give me any errors, but it only executes the code up until the IEnumerator. The progress bar does not move and it does not print the progress in the console.

Ответить
@uniotori8957
@uniotori8957 - 14.07.2016 08:14

I like your streamlining explanations, thanks

Ответить
@gkkkkk96
@gkkkkk96 - 02.07.2016 11:28

Can you create a tutorial about a simple questionnaire with true or false (radio button), and the user's answers will be passed on a script. Love this video, btw.!

Ответить