public void RenderOnGUI() { GUILayout.BeginArea(new Rect(Screen.width - 120, 0, 120, Screen.height)); GUILayout.Label("Variables:"); GUILayout.Label("m_ClientUnifiedMessageHandle: " + m_ClientUnifiedMessageHandle); GUILayout.EndArea(); // TODO: I don't know what I'm doing. This whole interface has essentially Zero Documentation. if (GUILayout.Button("SendMethod(\"CMsgTest_MessageToServer_Request\", null, 0, 1111)")) { m_ClientUnifiedMessageHandle = SteamUnifiedMessages.SendMethod("Player.GetGameBadgeLevels#1", null, 0, 1111); print("SteamUnifiedMessages.SendMethod(\"CMsgTest_MessageToServer_Request\", null, 0, 1111) : " + m_ClientUnifiedMessageHandle); } if (GUILayout.Button("GetMethodResponseInfo(m_ClientUnifiedMessageHandle, out ResponseSize, out Result)")) { uint ResponseSize; EResult Result; bool ret = SteamUnifiedMessages.GetMethodResponseInfo(m_ClientUnifiedMessageHandle, out ResponseSize, out Result); print("SteamUnifiedMessages.GetMethodResponseInfo(" + m_ClientUnifiedMessageHandle + ", out ResponseSize, out Result) : " + ret + " -- " + ResponseSize + " -- " + Result); } if (GUILayout.Button("GetMethodResponseData(m_ClientUnifiedMessageHandle, new byte[1], 1, true)")) { bool ret = SteamUnifiedMessages.GetMethodResponseData(m_ClientUnifiedMessageHandle, new byte[1], 1, true); print("SteamUnifiedMessages.GetMethodResponseData(" + m_ClientUnifiedMessageHandle + ", new byte[1], 1, true) : " + ret); } if (GUILayout.Button("ReleaseMethod(m_ClientUnifiedMessageHandle)")) { bool ret = SteamUnifiedMessages.ReleaseMethod(m_ClientUnifiedMessageHandle); print("SteamUnifiedMessages.ReleaseMethod(" + m_ClientUnifiedMessageHandle + ") : " + ret); } if (GUILayout.Button("SteamUnifiedMessages.SendNotification(\"MsgTest.NotifyServer#1\", null, 0)")) { bool ret = SteamUnifiedMessages.SendNotification("MsgTest.NotifyServer#1", null, 0); print("SteamUnifiedMessages.SendNotification(\"MsgTest.NotifyServer#1\", null, 0) : " + ret); } }
public void RenderOnGUI() { GUILayout.BeginArea(new Rect(Screen.width - 200, 0, 200, Screen.height)); GUILayout.Label("Variables:"); GUILayout.Label("m_ClientUnifiedMessageHandle: " + m_ClientUnifiedMessageHandle); GUILayout.EndArea(); GUILayout.BeginVertical("box"); m_ScrollPos = GUILayout.BeginScrollView(m_ScrollPos, GUILayout.Width(Screen.width - 215), GUILayout.Height(Screen.height - 33)); // TODO: I don't know what I'm doing. This whole interface has essentially Zero Documentation. if (GUILayout.Button("SendMethod(\"Player.GetGameBadgeLevels#1\", null, 0, 1111)")) { ClientUnifiedMessageHandle ret = SteamUnifiedMessages.SendMethod("Player.GetGameBadgeLevels#1", null, 0, 1111); m_ClientUnifiedMessageHandle = ret; print("SteamUnifiedMessages.SendMethod(" + "\"Player.GetGameBadgeLevels#1\"" + ", " + null + ", " + 0 + ", " + 1111 + ") : " + ret); } if (GUILayout.Button("GetMethodResponseInfo(m_ClientUnifiedMessageHandle, out ResponseSize, out Result)")) { uint ResponseSize; EResult Result; bool ret = SteamUnifiedMessages.GetMethodResponseInfo(m_ClientUnifiedMessageHandle, out ResponseSize, out Result); print("SteamUnifiedMessages.GetMethodResponseInfo(" + m_ClientUnifiedMessageHandle + ", " + "out ResponseSize" + ", " + "out Result" + ") : " + ret + " -- " + ResponseSize + " -- " + Result); } if (GUILayout.Button("GetMethodResponseData(m_ClientUnifiedMessageHandle, new byte[1], 1, true)")) { bool ret = SteamUnifiedMessages.GetMethodResponseData(m_ClientUnifiedMessageHandle, new byte[1], 1, true); print("SteamUnifiedMessages.GetMethodResponseData(" + m_ClientUnifiedMessageHandle + ", " + new byte[1] + ", " + 1 + ", " + true + ") : " + ret); } if (GUILayout.Button("ReleaseMethod(m_ClientUnifiedMessageHandle)")) { bool ret = SteamUnifiedMessages.ReleaseMethod(m_ClientUnifiedMessageHandle); print("SteamUnifiedMessages.ReleaseMethod(" + m_ClientUnifiedMessageHandle + ") : " + ret); } if (GUILayout.Button("SendNotification(\"MsgTest.NotifyServer#1\", null, 0)")) { bool ret = SteamUnifiedMessages.SendNotification("MsgTest.NotifyServer#1", null, 0); print("SteamUnifiedMessages.SendNotification(" + "\"MsgTest.NotifyServer#1\"" + ", " + null + ", " + 0 + ") : " + ret); } GUILayout.EndScrollView(); GUILayout.EndVertical(); }
/// <summary> /// <para> Releases the message and its corresponding allocated memory.</para> /// </summary> public static bool ReleaseMethod(ClientUnifiedMessageHandle hHandle) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUnifiedMessages_ReleaseMethod(hHandle)); }
/// <summary> /// <para> Gets a response in binary serialized form (and optionally release the corresponding allocated memory).</para> /// </summary> public static bool GetMethodResponseData(ClientUnifiedMessageHandle hHandle, byte[] pResponseBuffer, uint unResponseBufferSize, bool bAutoRelease) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUnifiedMessages_GetMethodResponseData(hHandle, pResponseBuffer, unResponseBufferSize, bAutoRelease)); }
/// <summary> /// <para> Gets the size of the response and the EResult. Returns false if the response is not ready yet.</para> /// </summary> public static bool GetMethodResponseInfo(ClientUnifiedMessageHandle hHandle, out uint punResponseSize, out EResult peResult) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUnifiedMessages_GetMethodResponseInfo(hHandle, out punResponseSize, out peResult)); }
public static extern bool ISteamUnifiedMessages_ReleaseMethod(ClientUnifiedMessageHandle hHandle);
public static extern bool ISteamUnifiedMessages_GetMethodResponseData(ClientUnifiedMessageHandle hHandle, [In, Out] byte[] pResponseBuffer, uint unResponseBufferSize, [MarshalAs(UnmanagedType.I1)] bool bAutoRelease);
public static extern bool ISteamUnifiedMessages_GetMethodResponseInfo(ClientUnifiedMessageHandle hHandle, out uint punResponseSize, out EResult peResult);
/// <summary> /// <para> Releases the message and its corresponding allocated memory.</para> /// </summary> public static bool ReleaseMethod(ClientUnifiedMessageHandle hHandle) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamUnifiedMessages_ReleaseMethod(hHandle); }
/// <summary> /// <para> Gets a response in binary serialized form (and optionally release the corresponding allocated memory).</para> /// </summary> public static bool GetMethodResponseData(ClientUnifiedMessageHandle hHandle, byte[] pResponseBuffer, uint unResponseBufferSize, bool bAutoRelease) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamUnifiedMessages_GetMethodResponseData(hHandle, pResponseBuffer, unResponseBufferSize, bAutoRelease); }
/// <summary> /// <para> Gets the size of the response and the EResult. Returns false if the response is not ready yet.</para> /// </summary> public static bool GetMethodResponseInfo(ClientUnifiedMessageHandle hHandle, out uint punResponseSize, out EResult peResult) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamUnifiedMessages_GetMethodResponseInfo(hHandle, out punResponseSize, out peResult); }