I’m working on a WebGL project. I added the ConvAI plugin and made the ConvAI character a real estate agent. I wrote my own manager script and used the initialization code you provided, but the convAIClient is not initializing. It shows a message that it’s undefined. All the DLL import extern methods are not working. How can I solve this?
Hello @suresh_chary,
Which version of the Convai WebGL SDK are you using?
Does it work when you try it on our demo scene?
Yes it is working in demo
and the apikey im assigning it public , not loading from Resource folder
Okay, what kind of changes do you make in your own custom scene?
I just added some more code of mine,
Whatever the code given by you is still there for initialisation, SendTextRequest, and all jslib methods. I am not using NarrativeDesignmanager.cs script, ConaiNPCManager.cs
Could you please share the hierarchy with me?
you can check the above link of scripts i wrote
in that VirtualAgentController is the replica of ConvAiNPC.cs
VirtualagentApiManager.cs is the replica of ConvaiGRPCWebAPI.cs
Could you please share a screenshot of the scene hiearchy?
here api gameobject is in mainmenu scene after that it will redirect to TownshipDayandNightscene actual metarob is in this scene
I don’t see Convai Essentials.
We are not using Convai Essentials. we wrote the UI code in VirtualAgentChatHandler.cs
You have to use it. This prefab has the core codes for Convai to work.
The “ConvAI Essentials” prefab contains ConvAIGrpcWebAPI, PlayerInteractionManager, PlayerInputManager, and NetworkReachability. I merged all these scripts into a scripts named with VirtualAgent.
I did the same thing previously for Windows and Android, and it was working fine. But when it comes to WebGL, it’s not working — the ConvAIClient is not initialized and shows a message that it’s undefined.
The WebGL platform is different. There is a connection between JS.
I don’t understand why you are trying to merge? Just use Convai Essentials.
Hi, in the Convai WebGL SDK there’s a method called SetTalkingStatus(). In your demo, it works correctly. However, when we implement it in our project, the talkingStatus briefly becomes true and then immediately switches back to false. Could you please help us understand what might be causing this issue?
Please share the code.


