版本
有些特定的 API 必须在 GME 服务之前调用。暴露的 C# 层 API 在以下文件中定义:Assets\GMESDK\GMEWWisePluginNative.cs
。游戏的 C# 代码会直接调用这些 API。有关各项函数的说明,请参阅 使用 GME In-Game Voice Chat API 章节。
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);