uezo / ChatdollKit

ChatdollKit enables you to make your 3D model into a chatbot
Apache License 2.0
693 stars 74 forks source link

Demo Error #230

Closed royshan closed 1 year ago

royshan commented 1 year ago

Dear Uezo,

Thank you very much for making such an interesting kit!

When I try to play the demos, e.g. DemoEcho scene, I ran into a strange error as follows:

NullReferenceException: Object reference not set to an instance of an object
ChatdollKit.Model.ModelController.UpdateAnimation () (at Assets/ChatdollKit/Scripts/Model/ModelController.cs:400)
ChatdollKit.Model.ModelController.Update () (at Assets/ChatdollKit/Scripts/Model/ModelController.cs:103)

I have set up the animator in the Model Controller and used the dependencies as you instructed. What could go wrong?

uezo commented 1 year ago

Hi @royshan , thank you for reporting. In short, this is a bug in animation lifecycle management.😞

Add the code below to EchoSkill for workaround.

private void Start()
{
    modelController.StartIdling();
}

Or, call modelController.Animate(animations) in Start() if you want to start with animations you like.

royshan commented 1 year ago

Thank you for your help! The bug is fixed. However, another one shows up as follows:

KeyNotFoundException: The given key 'Neutral' was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <1c8569827291471e9db0dcd976e97952>:0)
ChatdollKit.Model.VRCFaceExpressionProxy.SetExpressionSmoothly (System.String name, System.Single value) (at Assets/ChatdollKit/Scripts/Model/VRCFaceExpressionProxy.cs:85)
ChatdollKit.Model.ModelController.UpdateFace () (at Assets/ChatdollKit/Scripts/Model/ModelController.cs:487)
ChatdollKit.Model.ModelController.Update () (at Assets/ChatdollKit/Scripts/Model/ModelController.cs:104)

I guess the problem is that a non-existing expression is used?

Although I have programming experience, I am new to Unity. Again, I need your advice.

uezo commented 1 year ago

Hi @royshan , I created another issue to discuss face expression 👉 #232 Basically you should configure the face named Neutral. However, even if Neutral is missing, this should not be handled as a critical error but as a warning.

royshan commented 1 year ago

Thank you very much for your prompt response!