Комментарии:
great tutorial brother . you could be a very good teacher . with good resources you can compete brackey's.
ОтветитьNice tut...love the explaination...Great work
Ответитьit made my computer crash everytime I tried to press play.
ОтветитьVery well explained!! Thank you
Ответитьit was a little fast for me but good job on the video!
ОтветитьThat's really helping. Thank You so much !
ОтветитьYou sir made it pretty clear and straight. Your speed is just perfect, worth every second to watch!
Ответитьif you double the speed you will learn how to make this loading bar in 10 mins wow
ОтветитьLoved it. Fast, on point, no bullshit. Thanks!
ОтветитьSpeed, useful, clear, i love this tutorial!
Thank you! I've looking for something like this a long while!
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)
How do you disable?
Ответитьyou work at insomniac?
ОтветитьExcellent tutorial, straight to the point, clear and easy to understand
Ответитьvery useful.THX!!
Ответить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.
ОтветитьThanks it's helpful for me
Ответить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!
Well done and thank you! I hope you still continue doing Unity related things!
ОтветитьMost of your points are irrelevant! Content quality > Content quantity.
Ответить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;
}
}
}
Love the speed teach
Ответитьyou suck it didnt work at all
Ответить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..
ОтветитьWhat about a circular progress bar?
ОтветитьFast and clear. Perfect. Thank you !
Ответить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?
How to disable the elements? im just a beginner from this time. This is my Day2 in studying unity. Thanks
Ответитьi copy the exact codes but why there is an error? invalid token '(' etc...
Ответитьfucking quick. soooo quiiiiiiiiiiiiickkk :'@
Ответитьwhy caravans? what hes work ?!
ОтветитьVery good speed tut.
ОтветитьThanks, very useful!
ОтветитьNullReferenceException: Object reference not set to an instance of an object
progbar+<loadlevelwithrealprogress>c__Iterator0.MoveNext () (at Assets/progbar.cs:53
please help
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
Brilliant. This helped me out a lot in a project. I appreciate the video.
Subbed && Liked.
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)
Doesnt work
Ответить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.
ОтветитьLoadSceneAsync does not contain from SceneManagement what is the updated please help Im a beginner :'(
ОтветитьPerfect speed, and easy to follow.
ОтветитьGreat tutorial! Very very helpful. Thank you very much.
ОтветитьGood tutorial men, but you are going so fast. Thanks
Ответить+sub
ОтветитьWhat is the purpose of a fake loading bar?
Ответить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.
ОтветитьI like your streamlining explanations, thanks
Ответить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.!
Ответить