Fixed (1.20.1.5) Basic events or functions triggered before loading is finished

hazmhox

Moderator
Featured Contributor
Messages
1,409
Reactions
7,210
Points
173
I've had a few issues with some scene packed as .var since this feature is available. But I couldn't put my finger on the origin of this issue since I'm not the creator of these scenes.

With my first release as a .var and a few tests on an older computer. I know realize why these issues occur : basic events or functions occurs WHILE some assets are still loading. For instance, the main timeline starts to play before everything is loaded.

In the case of VAMafx demo, it is pretty much breaking the way the sound should work. I often use a simple non-looping timeline that is 1sec long and trigger a few things using actions. But, the timeline being played before all sounds are loaded result in a scene that does not work as intended.

I know that .var has some issues that have been already pointed out... and I don't know why sound is lagging that much when loading a scene in var format. But in a more general manner, to be sure that everything works properly each time a scene is loaded, the base events and functions ( starting animations, triggering etc ) should not overlap with the loading part of the scene ( var format or not ).

I don't think that the var system is the issue here. It only accentuate the loading issue which is the what makes a scene behave differently. I think it should behave almost the same if you were testing on a really old computer that struggles to load all the assets.
 
Yeah I need to look at this. Everything is supposed to be paused during scene load until all assets are loaded even if they are async loaded like images and sounds.
 
I found the cause of this and have it fixed for upcoming 1.20.1.5 release. Each audio file was added to a queue and was processed 1 at a time in a coroutine. During process of each queue item it would pause simulation correctly. But the issue was there was a 1 frame gap in between processing of each audio file where the simulation was not paused. This gap allowed the animation timeline to start running before all audio was loaded. If your trigger used the 1st audio file it would be fine. And if all audio loaded before other things pausing simulation were still loading, it would work fine. But it was not consistent and masked the issue. I have fixed the simulation pause system to be more robust, so I think it now works in all cases. All audio will be fully loaded before animation begins.

Note that the last major release fixed the audio load times from VAR which would have masked this issue in a lot of cases.
 
Back
Top Bottom