From 8eeb75a44b8d49894afe54baf4464321a652018b Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 5 Dec 2020 14:29:05 -0500 Subject: [PATCH] Made the RPC modules a public string --- .idea/.idea.Project Sandbox/.idea/indexLayout.xml | 1 + Assets/Scenes/SampleScene.unity | 5 +++++ Assets/Scripts/DiscordController.cs | 15 ++++++++++----- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.idea/.idea.Project Sandbox/.idea/indexLayout.xml b/.idea/.idea.Project Sandbox/.idea/indexLayout.xml index 84479e5..49660c7 100644 --- a/.idea/.idea.Project Sandbox/.idea/indexLayout.xml +++ b/.idea/.idea.Project Sandbox/.idea/indexLayout.xml @@ -30,6 +30,7 @@ .idea Build Library + Temp obj diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index 2cdff85..f89684b 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -2285,6 +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! --- !u!4 &2140247659 Transform: m_ObjectHideFlags: 0 diff --git a/Assets/Scripts/DiscordController.cs b/Assets/Scripts/DiscordController.cs index db0eec1..1df32b7 100644 --- a/Assets/Scripts/DiscordController.cs +++ b/Assets/Scripts/DiscordController.cs @@ -4,20 +4,25 @@ public class DiscordController : MonoBehaviour { 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(784835227338932244, (System.UInt64)Discord.CreateFlags.Default); + discord = new Discord.Discord(ApplicationID, (System.UInt64)Discord.CreateFlags.Default); var activityManager = discord.GetActivityManager(); var activity = new Discord.Activity { - State = "In Development...", - Details = "An upcoming Unity game by Alee!", + State = RpcStatus, + Details = RpcDetails, Assets = { - LargeImage = "wip", - LargeText = "Work in Progress!" + LargeImage = RpcLargeImage, + LargeText = RpcLargeImageText } }; activityManager.UpdateActivity(activity, (res) =>