Can't get Actions working in Unity

Original Discord Post by tyke_18 | 2024-09-12 11:14:09

Hi :slightly_smiling_face: I’m having some problems getting Actions working. I tried adding them to my existing project by following the documentation and a Convai video on the subject. After completing the steps, when I ask the character to dance, nothing happens. To try to rule out something to do with my project being an issue, I created a new Unity project, installed the Convai SDK (3.1.0), opened the “Convai Demo - Action” scene, and ran that, I couldn’t get the Dance Action to work. I never altered anything as I assumed it is setup ready to go, I did look at the settings within it and my project has the same setup for the components I have used. I know it’s probably something I’m not doing or I’m doing wrong, I’ve been at it 3 or 4 hours without success so thought I’d best ask for some help if possible please.

Reply by k3kalinix | 2024-09-12 16:37:06

Hello <@708608540763357234>,

Reply by k3kalinix | 2024-09-12 16:37:13

I’ll check and let you know.

Replying to k3kalinix’s Message

Reply by k3kalinix | 2024-09-12 16:37:13
I’ll check and let you know.

Reply by tyke_18 | 2024-09-12 17:38:24

Hi K3, sorry for the delay, it’ll be no doubt be something I’m not doing correctly, but I don’t know what :thinking:

Replying to tyke_18’s Message

Reply by tyke_18 | 2024-09-12 17:38:24
Hi K3, sorry for the delay, it’ll be no doubt be something I’m not doing correctly, but I don’t know what :thinking:

Reply by k3kalinix | 2024-09-12 17:52:09

We tested our demo scenes. It works. Can you say, “Can you dance?”

Replying to k3kalinix’s Message

Reply by k3kalinix | 2024-09-12 17:52:09
We tested our demo scenes. It works. Can you say, “Can you dance?”

Reply by tyke_18 | 2024-09-12 17:52:52

OK I will try that, I am just loading up the project now, give it a minute or 2.

Reply by tyke_18 | 2024-09-12 17:57:59

He didn’t dance.

Images:

Reply by tyke_18 | 2024-09-12 17:59:06

Images:

Reply by tyke_18 | 2024-09-12 18:01:09

Everything at default values like in the animator, I don’t understand it. I’ve altered some Convai scripts in a different project but not in this project it’s new one I created specifically for testing Actions.

Reply by k3kalinix | 2024-09-12 18:24:04

Can you please test in the Full Feature Demo scene

Reply by tyke_18 | 2024-09-12 19:25:15

I added the Convai Demo - Full Features scene didn’t change anything she wouldn’t dance. I’m switching my PC off until tomorrow now so no worries I will try again tomorrow will redownload the SDK and import it again, I have had Actions working about 10 days ago when I was experimenting adding a Reallusion character by following 1 of your videos.

Replying to tyke_18’s Message

Reply by tyke_18 | 2024-09-12 19:25:15
I added the Convai Demo - Full Features scene didn’t change anything she wouldn’t dance. I’m switching my PC off until tomorrow now so no worries I will try again tomorrow will redownload the SDK and import it again, I have had Actions working about 10 days ago when I was experimenting adding a Reallusion character by following 1 of your videos.

Reply by k3kalinix | 2024-09-12 19:42:47

Amelia doesn’t have a script.

Reply by k3kalinix | 2024-09-12 19:43:21

Make sure to test the Action Character.

Reply by tyke_18 | 2024-09-13 05:18:50

I tested Steve for actions in the Convai Demo Full Features scene and it worked, so it must be something I’m doing wrong which is what I thought. So I’ll get back to it, thanks for your assistance, will try again today, I’m confident I will solve it, I will look closely at how it is setup in the Demo scene and mirror it in my own app, thanks again :+1:

Replying to tyke_18’s Message

Reply by tyke_18 | 2024-09-13 05:18:50
I tested Steve for actions in the Convai Demo Full Features scene and it worked, so it must be something I’m doing wrong which is what I thought. So I’ll get back to it, thanks for your assistance, will try again today, I’m confident I will solve it, I will look closely at how it is setup in the Demo scene and mirror it in my own app, thanks again :+1:

Reply by k3kalinix | 2024-09-13 07:10:19

Just don’t use the Action Demo scene.

Reply by k3kalinix | 2024-09-13 07:10:26

There might be a problem.

Replying to k3kalinix’s Message

Reply by k3kalinix | 2024-09-13 07:10:26
There might be a problem.

Reply by tyke_18 | 2024-09-13 07:40:10

I think a script change I made in ConvaiNPC.cs (so I could use my own controller/button setup) may have stopped actions working for me by creating an error in ConvaiActionsHandler.cs. In my main project I have this in ConvaiNPC (it has the VR button in the IF statement but for testing purposes I am using the key ‘C’ here) :

Images:

Reply by tyke_18 | 2024-09-13 07:41:49

When I added this to Convai Full Features Demo ConvaiNPC.cs script (like in my main project) in which the actions had just worked fine with Steve, I get this error :

Images:

Reply by tyke_18 | 2024-09-13 07:42:51

It’s my error, something I have done :blush:, sorry to waste your time because of my mistake!

Reply by tyke_18 | 2024-09-13 08:04:48

for this code in the Update() method in ConvaiActionsHandler, after I say ‘Can you dance?’, " private void Update()
{
if (actionResponseList.Count > 0)
{
Debug.Log(“************ In Update(), actionResponseList = " + actionResponseList[0]);
ParseActions(actionResponseList[0]);
actionResponseList.RemoveAt(0);
}
}” the console output is "************ In Update(), actionResponseList = None
" which to me (I could be wrong, please correct me if I am) evaluates if actionResponseList has any values within it and it evaluates to true, but when I try to output the value at index 0 the value it outputs is “None”. “None” is not a standard Unity output for an error or something, this must be being set somewhere in code? When I run this in my project without the amendment to ConvaiNPC.cs, the console out from the Update method is “************ In Update(), actionResponseList = Dance”.