Version

menu_open

Using the GME C# API

There are some specific APIs that must be called before the GME service. The exposed C# layer APIs are defined in the following file: Assets\GMESDK\GMEWWisePluginNative.cs. The game’s C# code calls these APIs directly. For a description of each function, refer to the Using the GME In-Game Voice Chat API section.

public static extern IntPtr GMEWWisePlugin_GetVersion();
public static extern void GMEWWisePlugin_SetUserID(string userID);
public static extern void GMEWWisePlugin_SetRoomID(string roomID);

public static extern void GMEWWisePlugin_ReceivePlugin_SetReceiveOpenIDWithGameObjectID(
    ulong gameObjectID, string userID);
public static extern void GMEWWisePlugin_ReceivePlugin_GetReceiveOpenIDWithGameObjectID(
    ulong gameObjectID, StringBuilder userID);
public static extern void GMEWWisePlugin_SendPlugin_EnableLoopbackWithGameObjectID(
    ulong gameObjectID, bool enableLoopback);
public static extern bool GMEWWisePlugin_SendPlugin_GetEnableLoopbackWithGameObjectID(
    ulong gameObjectID);

public static extern int GMEWWisePlugin_GetMessage(
    ref int localUTCTime, ref int messageType, ref int code,
    byte[] message1, int len1
    byte[] message2, int len2);
public static extern void GMEWWisePlugin_SetLogLevel(int logLevel);

public static extern void GMEWWisePlugin_Pause();
public static extern void GMEWWisePlugin_Resume();

public static extern void GMEWWisePlugin_AddAudioBlockList(string targetID);
public static extern void GMEWWisePlugin_RemoveAudioBlockList(string targetID);

public static extern void GMEWWisePlugin_SetRangeAudioTeamID(int teamID);
public static extern void GMEWWisePlugin_SetRangeAudioTeamMode(int teamMode);
public static extern void GMEWWisePlugin_SetRangeAudioRecvRange(int range);
public static extern void GMEWWisePlugin_SetSelfPosition(
    int positionX, int positionY, int positionZ);

public static extern int GMEWWisePlugin_StartRecording(string speechLanguage);
public static extern int GMEWWisePlugin_StopRecording();
public static extern int GMEWWisePlugin_PlayRecordFile(string fileid);
public static extern int GMEWWisePlugin_StopPlayFile();
public static extern int GMEWWisePlugin_SpeechToText(
    string fileid, string speechLanguage, string translateLanguage);
public static extern int GMEWWisePlugin_GetVoiceFileDuration(string fileid);
public static extern void GMEWWisePlugin_SetRegion(int region);

Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise