Well this is my issue I'm working on a scene where my player trigger a collider2D and then a conversation start.
the game freeze for a very short time.
After only the first start dialogue the game will not freeze anymore.
I'm using the "Focus Template Standard Dialogue" I made some changes by replace the Text component to TextMeshPro components I remove some Horizontal and vertical Layout Group.
I check the profiler and this is what happens
Not sure how can I improve this, the only way to avoid this is by starting a conversation on Start method, but in my case I'm not using that.
Game freeze when use OnTrigger2D only the first time.
Re: Game freeze when use OnTrigger2D only the first time.
Hi,
Inspect the Dialogue Manager and tick Other Settings > Preload Resources. This may help.
Inspect the Dialogue Manager and tick Other Settings > Preload Resources. This may help.
Re: Game freeze when use OnTrigger2D only the first time.
I forgot to upload my dialogue System controller.
Ok this is my setup of the Dialog System Controller. I try with another Templates, the result is the same.
Ok this is my setup of the Dialog System Controller. I try with another Templates, the result is the same.
Re: Game freeze when use OnTrigger2D only the first time.
I recommend leaving the Debug Level at Warning. Otherwise you will miss warning messages about problems that might cause game freezes.
Try setting the Dialogue System Trigger to OnEnable, and disable the component. After entering play mode, manually enable the component in the inspector. Is there still a delay?
If yes: The delay is probably in the conversation or setting up the dialogue UI. Check for any warning or error messages. Do the nodes linked from <START> have a lot of Conditions?
If no: The delay is probably in your physics setup.
Try setting the Dialogue System Trigger to OnEnable, and disable the component. After entering play mode, manually enable the component in the inspector. Is there still a delay?
If yes: The delay is probably in the conversation or setting up the dialogue UI. Check for any warning or error messages. Do the nodes linked from <START> have a lot of Conditions?
If no: The delay is probably in your physics setup.
Re: Game freeze when use OnTrigger2D only the first time.
I made the test. I change the trigger to Enable.
While the freeze time is more short. it still have freeze time.
I also upload my conversation dialogue I think it's not super complex.
I'm also using Unity 2019.2.3f1
The only solution to avoid this freeze, is when I start my scene I just start an empty dialog it will show the dialog with no text and it will fade, then when I trigger my first dialog it will not have that freeze time.
I will check what more I can do to improve this solution.
While the freeze time is more short. it still have freeze time.
I also upload my conversation dialogue I think it's not super complex.
I'm also using Unity 2019.2.3f1
The only solution to avoid this freeze, is when I start my scene I just start an empty dialog it will show the dialog with no text and it will fade, then when I trigger my first dialog it will not have that freeze time.
I will check what more I can do to improve this solution.
Re: Game freeze when use OnTrigger2D only the first time.
Try changing the CPU details dropdown from Timeline to Hierarchy, and turn on Deep Profile. Then drill down into the hierarchy on the frame that lags and try to identify what it taking the most ms.