Search code examples
c#unity-game-enginevoicephoton

Photon, How to access Photon Recorder


I'm trying to access Photon's recorder component, but I don't know how to reference it properly, I think it would be because of the namespaces I'm not using.

I've got:

using Photon.Pun;
using Photon.Realtime;

I was thinking I would need something like:

using Photon.Voice;

Or something like it, but it doesn't get me the component. I've tried doing PhotonVoiceRecorder, Recorder, PhotonVoice but none of these work. I've also done some google searches but haven't found anything that has helped me.

I'm trying to get this because I want a push-to-talk function so it isn't always listening to what the player says.

I hope you can help me!

Cheers.


Solution

  • After doing some more scrounging around in Photons manual I had to put:

    using Photon.Voice.Unity;
    

    at the top of my project, and then just:

    Recorder recorder;
    

    as my component.

    Cheers!