Error when trying to run a scene

Original Discord Post by xisquinha.03 | 2024-03-19 16:50:58

I’m trying to crate a scene in unity with just a character but when I run it, appears a few errors in my console (I already restarted the unity 4x times):

NullReferenceException: Object reference not set to an instance of an object
Convai.Scripts.ConvaiNPC.FindActiveInputField () (at Assets/Convai/Scripts/ConvaiNPC.cs:323)

NullReferenceException: Object reference not set to an instance of an object
Convai.Scripts.ConvaiNPC.HandlePlayerInputs () (at Assets/Convai/Scripts/ConvaiNPC.cs:245)

NullReferenceException: Object reference not set to an instance of an object
Convai.Scripts.Utils.ConvaiPlayerMovement.HandleCursorLocking () (at Assets/Convai/Scripts/Utils/ConvaiPlayerMovement.cs:80)

RpcException: Status(StatusCode=Unavailable, Detail=“upstream max stream duration reached”)
Grpc.Core.Internal.ClientResponseStream`2[TRequest,TResponse].MoveNext (System.Threading.CancellationToken token) (at :0)
Convai.Scripts.Utils.ConvaiGRPCAPI.InitializeSessionIDAsync (System.String characterName, Service.ConvaiService+ConvaiServiceClient client, System.String characterID, System.String sessionID) (at Assets/Convai/Scripts/Utils/ConvaiGRPCAPI.cs:177)

Thanks for your help :slightly_smiling_face:

Reply by k3kalinix | 2024-03-19 17:21:22

Hello <@804750445121241138>

Reply by k3kalinix | 2024-03-19 17:22:59

If you are trying to create a new scene,
Just add the, Assets / Convai / Convai Base Scene Prefab.

Reply by xisquinha.03 | 2024-03-19 17:27:56

But I wanted to use the character that I created

Reply by k3kalinix | 2024-03-19 17:28:53

Yes, still you can use.

Reply by k3kalinix | 2024-03-19 17:29:09

Just remove the Amelia character.

Reply by xisquinha.03 | 2024-03-19 17:31:25

I can’t, it is opening a pop up saying “cannot restructure Prefab Instance”

Reply by xisquinha.03 | 2024-03-19 17:32:12

I’m sorry

Reply by xisquinha.03 | 2024-03-19 17:32:17

I’m dumb

Reply by xisquinha.03 | 2024-03-19 17:32:24

Thank you very much

Reply by k3kalinix | 2024-03-19 17:32:31

Okay second solution, duplicate our scene.

Replying to xisquinha.03’s Message

Reply by xisquinha.03 | 2024-03-19 17:32:24
Thank you very much

Reply by k3kalinix | 2024-03-19 17:32:48

You are welcome. :pray:t2:

Reply by aiaustin | 2024-03-28 16:40:35

I had this issue with the Unity demo project (downloaded today) too when trying to create a new scene with the Convai template. Same kinds of NullReferenceException errors. Inserting the scene base prefab and replacing Amelia with my own RPM avatar/character partially worked but holding down “T” to speak brought up Unity editor elements instead of accepting voice. I was able to simply copy the Amelia demo scene, remove Amelia and add my avatar there… so its maybe something minor in the setup or scripts for the New Scene process that is amiss. Thanks for a very useful demo scene and base to learn things.

Reply by k3kalinix | 2024-03-28 17:10:44

Yes, scene template doesn’t work correctly. We will fix it in the next update.

Reply by k3kalinix | 2024-03-28 17:11:48

Thank you for kind words.
My suggestions, duplicate our demo scene or create normal new scene and add Convai Base Scene Prefab.

Reply by aiaustin | 2024-03-28 17:14:46

Thanks. All good. Great to have good templates and help videos to get devs started.

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