Search Unity

Bug timeline freezes when loading a scene async

Discussion in 'Timeline' started by laurentlavigne, Mar 30, 2021.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    This is still a problem because I cannot use animator to hide load time.
    loadsceneasync works without a hitch when NOT using timeline.
    bug# 1325448
     
  2. nathanjams

    nathanjams

    Joined:
    Jul 27, 2016
    Posts:
    304
    This is more of a Unity issue than a Timeline issue, though I would love to have this resolved as well. But if you try running any process while scenes are loading you are going to get freezing and lagging in all noticable ways. Try making a simple animated sprite that runs while scenes are loading, it will freeze as well.
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    You're probably right, loading in unity is just bad.
    If you follow the vanilla doc it shouldn't because 2ms integration time per frame is not enough to cause hiccups but it does.
    Anyway after I logged this bug I received more info. The geist of it is that async is actually ... not concurrent. If you load 2 inactive scenes async the second load freezes up and only resumes when first one activates.
    I think that this plus resource.load(audio streaming) was confusing unity in a big way and causing the spikes but only in timeline, when the entire thing is done in a giant coroutine there is not a single drop.
    So loading sucks, timeline sucks, workaround is easy (and sad in a Atari ST sort of way): preload everything