Can't get Actions working in Unity

Reply by tyke_18 | 2024-09-13 08:18:12

(I forgot to add isListening = true; to inside the first IF statement in the Update method in the image). When I run the Convai Full Features Demo scene and use the default to talk key which is T the actions work correctly, when I press C (so invoking the code in that Update() method added to ConvaiNPC.cs) the action doesn’t work.

Reply by k3kalinix | 2024-09-13 09:18:21

Why do you use the C key?

Reply by tyke_18 | 2024-09-13 09:35:31

Just for testing in the Unity editor Play mode, instead of having to build the apk and run on my Quest 3. I could just use T but I want to make sure the custom button/keymapping code is working so I press C. I’ve made some progress, in the project I have created just to test actions, I have selected to use the old input system, commented out some lines relating the new input system, hardcoded the talk key as C, and now if I press C in play mode and ask the character to dance they dance. It’s just not working in my main project. When I press C the “ has started listening” doesn’t happen, only the “ has stopped listening (method: StopRecordAudio)” happens together with the talk key has been released too early message.

Reply by tyke_18 | 2024-09-13 09:36:00

I know this down to me to fix really because I appreciate we edit these scripts at our own risk.

Replying to tyke_18’s Message

Reply by tyke_18 | 2024-09-13 09:36:00
I know this down to me to fix really because I appreciate we edit these scripts at our own risk.

Reply by k3kalinix | 2024-09-13 09:54:15

Sorry about that, but it’s actually quite easy :smile:

Reply by k3kalinix | 2024-09-13 09:56:03

Assets\Convai\Resources\Controls.inputactions

Images:

Reply by k3kalinix | 2024-09-13 09:56:13

Just add new key for Talk Action

Reply by k3kalinix | 2024-09-13 09:56:39

Can be XR button, joystick, keyboard key etc.

Reply by k3kalinix | 2024-09-13 09:57:07

This way you will not need to create new functions.

Reply by tyke_18 | 2024-09-13 09:57:24

How please???

Reply by k3kalinix | 2024-09-13 09:57:47

Images:
image.png

Reply by tyke_18 | 2024-09-13 09:58:04

I need to map the Meta Quest button, is that an option on there?

Reply by k3kalinix | 2024-09-13 09:58:12

Yes

Reply by k3kalinix | 2024-09-13 09:58:25

If you want we can have a voice chat.

Reply by tyke_18 | 2024-09-13 09:58:50

yes ok sure

Reply by tyke_18 | 2024-09-13 09:59:10

now or later?

Reply by tyke_18 | 2024-09-13 09:59:32

hang on a min please…

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

now

Reply by tyke_18 | 2024-09-13 10:00:43

ok

Reply by tyke_18 | 2024-09-13 10:01:45

I’m not seeing Assets\Convai\Resources\Controls.inputactions

Images: