Search Unity

Problems with loading scenes progress bars...nothing then pop to 90 done.

Discussion in '2D' started by Feartheway, Apr 29, 2020.

  1. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    Okay here is the problem.
    I am figuring out progress bars

    video of the problem



    I have imported the easy progress bar asset to get going. (also got it working in doozy)

    Import the asset:
    Drag the prefab on to main canvas
    Create an on click event on play game button on main canvas
    Drag prefab from main canvas into play game button
    Find the function loadlevel
    enter in the integer of the scene number starting at zero.

    Unity Asset Easy Loading Screen Asset Store https://assetstore.unity.com/packages...
    Unity Asset Easy Loading Screen Demo Video https://www.youtube.com/watch?v=N67Kc...

    Unity Asset loading screen animation https://assetstore.unity.com/packages/tools/loading-screen-animation-98505


    I click the button play game
    the button has a progress bar and load next scene script

    system hangs a bit seems to do nothing then progress bar pops to 90 and next scene is loaded

    its also happening with doozy.

    video of the problem skip to 32:55 demo of progress bar hanging.


    I have even put in dummy progress bars that just use update and system timer.
    When i click the button even they stop.
     
    Last edited: Apr 29, 2020
  2. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    i think it might be something to do with using co routines / tasks to run the UI in one routine and loadscene in another.

    System.Threading.Task
     
  3. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    11,481
    Note that you'll get better feedback for UI issues in the UI forum.
     
  4. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    sure, I think i am cracking it. It seems to be to do with threads.
    will post here if i manage to sort it out.
     
  5. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    which ui forum should this be posted in? upload_2020-4-29_18-1-59.png
     
  6. yannisk

    yannisk

    Joined:
    Jul 10, 2019
    Posts:
    6
    try to build and test there.

    was facing a similar error and randomly in a test found out it works on built version, while in Unity Play mode was lagging and losing frames
     
    Feartheway likes this.
  7. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    ok trying a real build now. Thanks for the tip!
     
  8. Feartheway

    Feartheway

    Joined:
    Dec 12, 2017
    Posts:
    92
    real build helps a lot but still want to see if threads will help. Another useful video

     
  9. yannisk

    yannisk

    Joined:
    Jul 10, 2019
    Posts:
    6
    nice! glad it works. :D
    As for now, with heavy VR scenes (and transition between them) haven't had the need for threads.
    this also with low specs (1050ti) but fairly optimised scenes
     
  10. brigas

    brigas

    Joined:
    Oct 4, 2014
    Posts:
    522
    add debug logs and look at the console to find out where it is hanging. Before loading the coroutine, during the while loop, and after. The last debug log you see will be your bottleneck. Looks like your loading coroutine is just getting skipped
     
    Feartheway likes this.