summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-12-05 14:29:05 -0500
committerAndrew Lee <alee14498@protonmail.com>2020-12-05 14:29:05 -0500
commit8eeb75a44b8d49894afe54baf4464321a652018b (patch)
treeb7480b43c6c9f162a1e8e6b8f846961b5ea5561a
parent0f7e3ced25ee1138980f4ddfcb37e45fbc54bead (diff)
downloadProject-Sandbox-8eeb75a44b8d49894afe54baf4464321a652018b.tar.gz
Project-Sandbox-8eeb75a44b8d49894afe54baf4464321a652018b.tar.bz2
Project-Sandbox-8eeb75a44b8d49894afe54baf4464321a652018b.zip
Made the RPC modules a public string
-rw-r--r--.idea/.idea.Project Sandbox/.idea/indexLayout.xml1
-rw-r--r--Assets/Scenes/SampleScene.unity5
-rw-r--r--Assets/Scripts/DiscordController.cs15
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 @@
<Path>.idea</Path>
<Path>Build</Path>
<Path>Library</Path>
+ <Path>Temp</Path>
<Path>obj</Path>
</explicitExcludes>
</component>
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) =>