Gotta update unity eventually and this is how I am testing

This commit is contained in:
Mason Sciotti 2018-03-29 14:10:52 -07:00
parent 5b495f507d
commit afdc5fd23a
2 changed files with 4 additions and 4 deletions

View File

@ -50,10 +50,10 @@ public class DiscordController : MonoBehaviour
hasResponded.Invoke();
}
public void ReadyCallback()
public void ReadyCallback(ref DiscordRpc.JoinRequest request)
{
++callbackCalls;
Debug.Log("Discord: ready");
Debug.Log(string.Format("Discord: connected to {0}#{1}: {2}", request.username, request.discriminator, request.userId));
onConnect.Invoke();
}
@ -113,7 +113,7 @@ public class DiscordController : MonoBehaviour
handlers.joinCallback += JoinCallback;
handlers.spectateCallback += SpectateCallback;
handlers.requestCallback += RequestCallback;
DiscordRpc.Initialize(applicationId, ref handlers, true, optionalSteamId);
DiscordRpc.Initialize("422289129460465664", ref handlers, true, "9999");
}
void OnDisable()

View File

@ -6,7 +6,7 @@ using System.Text;
public class DiscordRpc
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ReadyCallback();
public delegate void ReadyCallback(ref JoinRequest request);
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void DisconnectedCallback(int errorCode, string message);