Page 1 of 1

I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Thu Apr 29, 2021 10:01 am
by destrucity
I have a DialogueSystemTrigger set to trigger on Start and play a sequence:
Image

When I hit play in the editor, the game runs for about a second (maybe less?) before the fade kicks in. I seem to get the same result if I uncheck "Wait 1 Frame."

Maybe this goes away in builds? Any advice?

Thanks!

Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Thu Apr 29, 2021 11:35 am
by Tony Li
Hi,

Test a build. It sounds like, when you hit the play button, the game hasn't fully entered play mode yet.

Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Tue May 11, 2021 4:34 pm
by destrucity
Hi Tony,

Thanks again for all of your help. I have a video capture that show's the issue in a build. I appreciate any advice you might be able to share:


Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Tue May 11, 2021 5:01 pm
by Tony Li
Hi,

Try unticking 'Wait One Frame'.

Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Tue May 11, 2021 5:27 pm
by destrucity
It looks the same (or close enough that I can't tell) with "Wait 1 Frame" unchecked :(

Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Tue May 11, 2021 9:02 pm
by Tony Li
Hi,

Please back up your project and try this patch:

DS_Frame1Patch_2021-05-11.unitypackage

When a Dialogue System Trigger is set to OnStart or OnEnable, it attempts to wait until the end of the frame to allow other components' Start methods to finish first. Several Unity versions have a bug with execution order on frame 1 (the first frame of play mode) that cause "yield WaitForEndOfFrame" to incorrectly yield an extra frame. This only occurs if Unity is on frame 1. In version 2.2.17, I implemented a workaround. If a Dialogue System Trigger attempts to start on frame 1, it will start immediately instead of trying to wait until the end of the frame.

Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Wed May 12, 2021 11:40 am
by destrucity
Just following up to report that this does fix it. Thanks!!

Re: I see a second or so of my game before the Fade(in,2) sequence kicks in

Posted: Wed May 12, 2021 1:37 pm
by Tony Li
Great! Thanks for letting me know.