mirror of
https://github.com/alee14-projects/Project-Sandbox.git
synced 2025-01-22 08:51:48 -05:00
Made the RPC modules a public string
This commit is contained in:
parent
0f7e3ced25
commit
8eeb75a44b
3 changed files with 16 additions and 5 deletions
|
@ -30,6 +30,7 @@
|
||||||
<Path>.idea</Path>
|
<Path>.idea</Path>
|
||||||
<Path>Build</Path>
|
<Path>Build</Path>
|
||||||
<Path>Library</Path>
|
<Path>Library</Path>
|
||||||
|
<Path>Temp</Path>
|
||||||
<Path>obj</Path>
|
<Path>obj</Path>
|
||||||
</explicitExcludes>
|
</explicitExcludes>
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -2285,6 +2285,11 @@ MonoBehaviour:
|
||||||
m_Script: {fileID: 11500000, guid: 4cb25a675054556c4b6a193453e179c1, type: 3}
|
m_Script: {fileID: 11500000, guid: 4cb25a675054556c4b6a193453e179c1, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
ApplicationID: 784835227338932244
|
||||||
|
RpcStatus: In Development...
|
||||||
|
RpcDetails: An upcoming Unity game by Alee!
|
||||||
|
RpcLargeImage: wip
|
||||||
|
RpcLargeImageText: Work in Progress!
|
||||||
--- !u!4 &2140247659
|
--- !u!4 &2140247659
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
@ -4,20 +4,25 @@ public class DiscordController : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
public Discord.Discord discord;
|
public Discord.Discord discord;
|
||||||
|
public long ApplicationID;
|
||||||
|
public string RpcStatus;
|
||||||
|
public string RpcDetails;
|
||||||
|
public string RpcLargeImage;
|
||||||
|
public string RpcLargeImageText;
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
void Start () {
|
void Start () {
|
||||||
System.Environment.SetEnvironmentVariable("DISCORD_INSTANCE_ID", "0");
|
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 activityManager = discord.GetActivityManager();
|
||||||
var activity = new Discord.Activity
|
var activity = new Discord.Activity
|
||||||
{
|
{
|
||||||
State = "In Development...",
|
State = RpcStatus,
|
||||||
Details = "An upcoming Unity game by Alee!",
|
Details = RpcDetails,
|
||||||
Assets =
|
Assets =
|
||||||
{
|
{
|
||||||
LargeImage = "wip",
|
LargeImage = RpcLargeImage,
|
||||||
LargeText = "Work in Progress!"
|
LargeText = RpcLargeImageText
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
activityManager.UpdateActivity(activity, (res) =>
|
activityManager.UpdateActivity(activity, (res) =>
|
||||||
|
|
Loading…
Reference in a new issue