Fixed some naming

This commit is contained in:
Andrew Lee 2020-12-05 14:38:27 -05:00
parent 8eeb75a44b
commit 130b3e7931
Signed by: andrew
GPG key ID: 4DCE67C47836D125
2 changed files with 21 additions and 20 deletions

View file

@ -2285,11 +2285,11 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4cb25a675054556c4b6a193453e179c1, type: 3}
m_Name:
m_EditorClassIdentifier:
ApplicationID: 784835227338932244
RpcStatus: In Development...
RpcDetails: An upcoming Unity game by Alee!
RpcLargeImage: wip
RpcLargeImageText: Work in Progress!
applicationID: 784835227338932244
rpcStatus: In Development...
rpcDetails: An upcoming Unity game by Alee!
rpcLargeImage: wip
rpcLargeImageText: Work in Progress!
--- !u!4 &2140247659
Transform:
m_ObjectHideFlags: 0

View file

@ -1,33 +1,34 @@
using UnityEngine;
using UnityEngine.Serialization;
public class DiscordController : MonoBehaviour
{
public Discord.Discord discord;
public long ApplicationID;
public string RpcStatus;
public string RpcDetails;
public string RpcLargeImage;
public string RpcLargeImageText;
public Discord.Discord Discord;
public long applicationID;
public string rpcStatus;
public string rpcDetails;
public string rpcLargeImage;
public string rpcLargeImageText;
// Use this for initialization
void Start () {
System.Environment.SetEnvironmentVariable("DISCORD_INSTANCE_ID", "0");
discord = new Discord.Discord(ApplicationID, (System.UInt64)Discord.CreateFlags.Default);
var activityManager = discord.GetActivityManager();
Discord = new Discord.Discord(applicationID, (System.UInt64)global::Discord.CreateFlags.Default);
var activityManager = Discord.GetActivityManager();
var activity = new Discord.Activity
{
State = RpcStatus,
Details = RpcDetails,
State = rpcStatus,
Details = rpcDetails,
Assets =
{
LargeImage = RpcLargeImage,
LargeText = RpcLargeImageText
LargeImage = rpcLargeImage,
LargeText = rpcLargeImageText
}
};
activityManager.UpdateActivity(activity, (res) =>
{
if (res == Discord.Result.Ok)
if (res == global::Discord.Result.Ok)
{
Debug.LogWarning("Everything is fine!");
}
@ -35,7 +36,7 @@ public class DiscordController : MonoBehaviour
activityManager.ClearActivity((result) =>
{
if (result == Discord.Result.Ok)
if (result == global::Discord.Result.Ok)
{
Debug.Log("Success!");
}
@ -48,6 +49,6 @@ public class DiscordController : MonoBehaviour
// Update is called once per frame
void Update () {
discord.RunCallbacks();
Discord.RunCallbacks();
}
}