Page 1 of 1

Delay after a scene is loaded

Posted: Wed Mar 15, 2023 4:56 am
by eugeen
Hi! I’ve got a bit of a problem.
I have a conversation triggering OnStart that disables some objects (a Cinemachine cam) either via dialogue events component or a first node’s Sequence commands. When I start the scene itself it works perfectly. However, when I transit to it (e.g. from a title menu) there’s a delay (like several seconds) before objects get disabled although the conversation starts immediately.
Is there a way to insure the conversation (the appearance of dialogue boxes) starts exactly with these events/commands being fired?

Thank you.

Re: Delay after a scene is loaded

Posted: Wed Mar 15, 2023 8:46 am
by Tony Li
Hi,

Please temporarily set the Dialogue Manager's Other Settings > Debug Level to Info. This will log detailed Dialogue System activity to the Console window.

Then play from the title menu and transit to the conversation scene. Review the logs to determine what's going on. Pay particular attention to the times of each log entry. If something says it's starting at a certain time but isn't actually appearing to later, maybe something internally is causing a delay, or maybe an animation is taking time to make something appear (e.g., slow fade in).

If you're using the save system, try setting the Dialogue System Trigger's trigger to OnSaveDataApplied. This will make it start after the save system has applied its saved data to the scene. Or, if you're playing the scene directly instead of coming from a save system scene change, it will wait an equivalent number of frames as specified by the Save System component's Frame To Wait Before Apply Data.

If you can't identify the issue from the logs, please feel free to post the logs here.

Re: Delay after a scene is loaded

Posted: Wed Mar 15, 2023 8:35 pm
by eugeen
Hi! I checked out the log and noticed that there's a variable evaluation happening 27 times after which nodes start to execute as expected.
The thing is I had 2 dialogue branches going from Start node which relied on a variable condition. After removing one of the branches the delay disappeared as if it was because of some intence calculations (although it's a bit weird as there was only a bool).
Anyway the problem is solved.
Thank you!

Re: Delay after a scene is loaded

Posted: Wed Mar 15, 2023 8:41 pm
by Tony Li
Thanks for the update.

This might also be helpful in the future: How To: Use Group Nodes To Reduce Condition Checking Time