No response from Unity NPC

Original Discord Post by akster213 | 2024-09-27 16:17:18

Sometimes the NPC will not respond to the player’s speech input. Unity throws an error that says MissingReferenceException: The object of type ‘TextMeshProUGUI’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Convai.Scripts.Runtime.UI.ChatBoxUI.DestroyOldestMessage (). We have the chat box disabled in the settings window, is that the issue? When this issue happens the character will still go through the animations as if it is speaking and the mouth will move, but no audio output will occur. Please let me know how to fix this, it has occurred many times.

Reply by akster213 | 2024-09-27 16:49:39

Update: just restarting my PC fixed the error for some reason, but I would really like a solution. I know that this won’t be a permanent solution seeing as this has happened multiple times and I have restarted my PC multiple times since then.

Replying to akster213’s Message

Reply by akster213 | 2024-09-27 16:17:18
Sometimes the NPC will not respond to the player’s speech input. Unity throws an error that says MissingReferenceException: The object of type ‘TextMeshProUGUI’ has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
Convai.Scripts.Runtime.UI.ChatBoxUI.DestroyOldestMessage (). We have the chat box disabled in the settings window, is that the issue? When this issue happens the character will still go through the animations as if it is speaking and the mouth will move, but no audio output will occur. Please let me know how to fix this, it has occurred many times.

Reply by k3kalinix | 2024-09-27 17:06:10

I think you changed/removed something. I suggest you revert the prefab changes.

Reply by akster213 | 2024-09-27 17:07:02

Will reverting the prefab changes remove the animations I have added?

Reply by akster213 | 2024-09-27 17:07:16

Or I guess I’ll just have to attach the animation controllers again

Reply by akster213 | 2024-09-27 17:07:23

I created custom animation controllers for each NPC

Reply by k3kalinix | 2024-09-27 17:07:31

Which animations?

Reply by k3kalinix | 2024-09-27 17:07:41

I said for ChatUI Prefabs

Reply by akster213 | 2024-09-27 17:07:49

Oh I see

Reply by akster213 | 2024-09-27 17:08:06

Ok I will try it

Reply by akster213 | 2024-09-27 17:08:08

Thank you

This conversation happened on the Convai Discord Server, so this post will be closed.