Unity Discord Rich Presence
This commit is contained in:
parent
cd9aa13478
commit
657f8688e9
11
Unity-Files/.erp
Normal file
11
Unity-Files/.erp
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0"?>
|
||||
<ERPSettings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<showSceneName>true</showSceneName>
|
||||
<showProjectName>true</showProjectName>
|
||||
<resetOnSceneChange>false</resetOnSceneChange>
|
||||
<debugMode>false</debugMode>
|
||||
<EditorClosed>true</EditorClosed>
|
||||
<LastTimestamp>1635426319</LastTimestamp>
|
||||
<LastSessionID>4444499006469112348</LastSessionID>
|
||||
<Errored>false</Errored>
|
||||
</ERPSettings>
|
8
Unity-Files/Assets/ERP.meta
generated
Normal file
8
Unity-Files/Assets/ERP.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 666c770f212538948849887e35c06209
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
25
Unity-Files/Assets/ERP/CHANGELOG.MD
Normal file
25
Unity-Files/Assets/ERP/CHANGELOG.MD
Normal file
@ -0,0 +1,25 @@
|
||||
# Changelog
|
||||
|
||||
## [3.1.2]
|
||||
### Fixed
|
||||
- Fixed not working with Discord PTB or Discord Canary
|
||||
|
||||
## [3.1.1]
|
||||
### Fixed
|
||||
- Fixed Crash when discord is not running
|
||||
|
||||
## [3.0.2]
|
||||
### Fixed
|
||||
- Fixed Issue with timestamps not showing on first import
|
||||
|
||||
## [3.0.1]
|
||||
### Fixed
|
||||
- Fixed Issue with discord's dll
|
||||
|
||||
## [3.0.0]
|
||||
### Added
|
||||
- Editor Window
|
||||
- Ablity to hide project name
|
||||
- Ablity to hide scene name
|
||||
### Fixed
|
||||
- Timestamps fixed
|
7
Unity-Files/Assets/ERP/CHANGELOG.MD.meta
generated
Normal file
7
Unity-Files/Assets/ERP/CHANGELOG.MD.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cf48f95f04e8c9f43b2892a0ef491ca3
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Documentation.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Documentation.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 404dfd50bd7825149b4dc8d5c79ac837
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Unity-Files/Assets/ERP/Documentation/Editor Rich Presence Documentation.pdf
(Stored with Git LFS)
Normal file
BIN
Unity-Files/Assets/ERP/Documentation/Editor Rich Presence Documentation.pdf
(Stored with Git LFS)
Normal file
Binary file not shown.
7
Unity-Files/Assets/ERP/Documentation/Editor Rich Presence Documentation.pdf.meta
generated
Normal file
7
Unity-Files/Assets/ERP/Documentation/Editor Rich Presence Documentation.pdf.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5126d240b3c42a449843d9abbc8fa0a8
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Editor.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Editor.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc28a777929b11d4db19be0bbf17326c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
203
Unity-Files/Assets/ERP/Editor/ERP.cs
Normal file
203
Unity-Files/Assets/ERP/Editor/ERP.cs
Normal file
@ -0,0 +1,203 @@
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEditor;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading;
|
||||
using ERP.Discord;
|
||||
using System.Diagnostics;
|
||||
using Debug = UnityEngine.Debug;
|
||||
|
||||
namespace ERP
|
||||
{
|
||||
[InitializeOnLoad]
|
||||
public static class ERP
|
||||
{
|
||||
private const string applicationId = "509465267630374935";
|
||||
private const string prefix = "<b>ERP</b>";
|
||||
|
||||
public static Discord.Discord discord { get; private set; }
|
||||
|
||||
|
||||
public static string projectName { get; private set; }
|
||||
public static string sceneName { get; private set; }
|
||||
public static bool showSceneName = true;
|
||||
public static bool showProjectName = true;
|
||||
public static bool resetOnSceneChange = false;
|
||||
public static bool debugMode = false;
|
||||
public static bool EditorClosed = true;
|
||||
public static long lastTimestamp = 0;
|
||||
public static long lastSessionID = 0;
|
||||
public static bool Errored = false;
|
||||
|
||||
public static bool Failed;
|
||||
static ERP()
|
||||
{
|
||||
ERPSettings.GetSettings();
|
||||
DelayStart();
|
||||
}
|
||||
public static async void DelayStart(int delay = 1000)
|
||||
{
|
||||
await Task.Delay(delay);
|
||||
Init();
|
||||
}
|
||||
public static void Init()
|
||||
{
|
||||
if (Errored && lastSessionID == EditorAnalyticsSessionInfo.id)
|
||||
{
|
||||
if (debugMode)
|
||||
LogWarning($"Error but in same session");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!DiscordRunning())
|
||||
{
|
||||
LogWarning("Can't find Discord's Process");
|
||||
Failed = true;
|
||||
Errored = true;
|
||||
ERPSettings.SaveSettings();
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
discord = new Discord.Discord(long.Parse(applicationId), (long)CreateFlags.Default);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
if (debugMode)
|
||||
LogWarning("Expected Error, retrying\n" + e.ToString());
|
||||
if (!Failed)
|
||||
DelayStart(2000);
|
||||
Failed = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (!resetOnSceneChange || EditorAnalyticsSessionInfo.id != lastSessionID)
|
||||
{
|
||||
lastTimestamp = GetTimestamp();
|
||||
ERPSettings.SaveSettings();
|
||||
}
|
||||
|
||||
lastSessionID = EditorAnalyticsSessionInfo.id;
|
||||
|
||||
projectName = Application.productName;
|
||||
sceneName = EditorSceneManager.GetActiveScene().name;
|
||||
UpdateActivity();
|
||||
|
||||
EditorApplication.update += Update;
|
||||
EditorSceneManager.sceneOpened += SceneOpened;
|
||||
Log("Started!");
|
||||
}
|
||||
|
||||
private static void SceneOpened(UnityEngine.SceneManagement.Scene scene, OpenSceneMode mode)
|
||||
{
|
||||
if (resetOnSceneChange)
|
||||
lastTimestamp = GetTimestamp();
|
||||
sceneName = EditorSceneManager.GetActiveScene().name;
|
||||
UpdateActivity();
|
||||
}
|
||||
|
||||
private static void Update()
|
||||
{
|
||||
if (discord != null)
|
||||
discord.RunCallbacks();
|
||||
|
||||
}
|
||||
public static void UpdateActivity()
|
||||
{
|
||||
Log("Updating Activity");
|
||||
if (discord == null)
|
||||
Init();
|
||||
|
||||
projectName = Application.productName;
|
||||
sceneName = EditorSceneManager.GetActiveScene().name;
|
||||
|
||||
var activityManager = discord.GetActivityManager();
|
||||
|
||||
Activity activity = new Activity
|
||||
{
|
||||
State = showProjectName ? projectName : "",
|
||||
Details = showSceneName ? sceneName : "",
|
||||
Timestamps =
|
||||
{
|
||||
Start = lastTimestamp
|
||||
},
|
||||
Assets =
|
||||
{
|
||||
LargeImage = "logo",
|
||||
LargeText = "Unity " + Application.unityVersion,
|
||||
SmallImage = "marshmello",
|
||||
SmallText = "ERP on Unity Asset Store",
|
||||
},
|
||||
};
|
||||
|
||||
activityManager.UpdateActivity(activity, result =>
|
||||
{
|
||||
if (result != Result.Ok)
|
||||
LogError("Error from discord (" + result.ToString() + ")");
|
||||
else
|
||||
Log("Discord Result = " + result.ToString());
|
||||
});
|
||||
|
||||
ERPSettings.SaveSettings();
|
||||
}
|
||||
public static long GetTimestamp()
|
||||
{
|
||||
if (!resetOnSceneChange)
|
||||
{
|
||||
TimeSpan timeSpan = TimeSpan.FromMilliseconds(EditorAnalyticsSessionInfo.elapsedTime);
|
||||
long timestamp = DateTimeOffset.Now.Add(timeSpan).ToUnixTimeSeconds();
|
||||
Log("Got time stamp: " + timestamp);
|
||||
return timestamp;
|
||||
}
|
||||
long unixTimestamp = DateTimeOffset.Now.ToUnixTimeSeconds();
|
||||
Log("Got time stamp: " + unixTimestamp);
|
||||
return unixTimestamp;
|
||||
}
|
||||
public static void Log(object message)
|
||||
{
|
||||
if (debugMode)
|
||||
Debug.Log(prefix + ": " + message);
|
||||
}
|
||||
public static void LogWarning(object message)
|
||||
{
|
||||
if (debugMode)
|
||||
Debug.LogWarning(prefix + ": " + message);
|
||||
}
|
||||
public static void LogError(object message)
|
||||
{
|
||||
Debug.LogError(prefix + ": " + message);
|
||||
}
|
||||
|
||||
private static bool DiscordRunning()
|
||||
{
|
||||
Process[] processes = Process.GetProcessesByName("Discord");
|
||||
|
||||
if (processes.Length == 0)
|
||||
{
|
||||
processes = Process.GetProcessesByName("DiscordPTB");
|
||||
|
||||
if (processes.Length == 0)
|
||||
{
|
||||
processes = Process.GetProcessesByName("DiscordCanary");
|
||||
}
|
||||
}
|
||||
|
||||
if (debugMode)
|
||||
{
|
||||
for (int i = 0; i < processes.Length; i++)
|
||||
{
|
||||
Log($"({i}/{processes.Length - 1})Found Process {processes[i].ProcessName}");
|
||||
}
|
||||
}
|
||||
return processes.Length != 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
11
Unity-Files/Assets/ERP/Editor/ERP.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/ERP.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 22bb83fad6b4e1e44afed775331903a8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
77
Unity-Files/Assets/ERP/Editor/ERPSettings.cs
Normal file
77
Unity-Files/Assets/ERP/Editor/ERPSettings.cs
Normal file
@ -0,0 +1,77 @@
|
||||
#if UNITY_EDITOR
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml;
|
||||
using System.Xml.Serialization;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ERP
|
||||
{
|
||||
[Serializable]
|
||||
public class ERPSettings
|
||||
{
|
||||
private static string path = Directory.GetCurrentDirectory() + "/.erp";
|
||||
public bool showSceneName;
|
||||
public bool showProjectName;
|
||||
public bool resetOnSceneChange;
|
||||
public bool debugMode;
|
||||
public bool EditorClosed;
|
||||
public long LastTimestamp;
|
||||
public long LastSessionID;
|
||||
public bool Errored;
|
||||
|
||||
public ERPSettings() { }
|
||||
|
||||
public ERPSettings(bool showSceneName, bool showProjectName, bool resetOnSceneChange, bool debugMode, bool editorClosed, long lastTimestamp, long lastSessionID, bool errored)
|
||||
{
|
||||
this.showSceneName = showSceneName;
|
||||
this.showProjectName = showProjectName;
|
||||
this.resetOnSceneChange = resetOnSceneChange;
|
||||
this.debugMode = debugMode;
|
||||
EditorClosed = editorClosed;
|
||||
LastTimestamp = lastTimestamp;
|
||||
LastSessionID = lastSessionID;
|
||||
Errored = errored;
|
||||
}
|
||||
|
||||
public static void GetSettings()
|
||||
{
|
||||
if (File.Exists(path))
|
||||
{
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(ERPSettings));
|
||||
FileStream stream = new FileStream(path, FileMode.Open);
|
||||
ERPSettings settings = serializer.Deserialize(stream) as ERPSettings;
|
||||
ApplySettings(settings);
|
||||
stream.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private static void ApplySettings(ERPSettings settings)
|
||||
{
|
||||
ERP.showSceneName = settings.showSceneName;
|
||||
ERP.showProjectName = settings.showProjectName;
|
||||
ERP.resetOnSceneChange = settings.resetOnSceneChange;
|
||||
ERP.debugMode = settings.debugMode;
|
||||
ERP.EditorClosed = settings.EditorClosed;
|
||||
ERP.lastTimestamp = settings.LastTimestamp;
|
||||
ERP.lastSessionID = settings.LastSessionID;
|
||||
ERP.Errored = settings.Errored;
|
||||
ERP.Log("Applied Settings from file");
|
||||
}
|
||||
|
||||
public static void SaveSettings()
|
||||
{
|
||||
ERPSettings settings = new ERPSettings(ERP.showSceneName, ERP.showProjectName, ERP.resetOnSceneChange, ERP.debugMode, ERP.EditorClosed, ERP.lastTimestamp, ERP.lastSessionID, ERP.Errored);
|
||||
|
||||
XmlSerializer serializer = new XmlSerializer(typeof(ERPSettings));
|
||||
var stream = new FileStream(path, FileMode.Create);
|
||||
serializer.Serialize(stream, settings);
|
||||
stream.Close();
|
||||
ERP.Log("Saved Settings");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
11
Unity-Files/Assets/ERP/Editor/ERPSettings.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/ERPSettings.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2d151e101b964240b0e57a8cf391c3c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
93
Unity-Files/Assets/ERP/Editor/ERPWindow.cs
Normal file
93
Unity-Files/Assets/ERP/Editor/ERPWindow.cs
Normal file
@ -0,0 +1,93 @@
|
||||
#if UNITY_EDITOR
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
|
||||
namespace ERP
|
||||
{
|
||||
public class ERPWindow : EditorWindow
|
||||
{
|
||||
private static ERPWindow _window;
|
||||
|
||||
[MenuItem("Window/Editor Rich Presence")]
|
||||
private static void Init()
|
||||
{
|
||||
_window = (ERPWindow)GetWindow(typeof(ERPWindow), false, "Editor Rich Presence");
|
||||
_window.Show();
|
||||
}
|
||||
private void OnGUI()
|
||||
{
|
||||
if (ERP.discord == null && !ERP.Failed)
|
||||
ERP.DelayStart();
|
||||
|
||||
if (ERP.Failed | ERP.Errored)
|
||||
{
|
||||
GUILayout.Label($"ERP Failed to start", EditorStyles.boldLabel);
|
||||
if (GUILayout.Button("Retry"))
|
||||
{
|
||||
ERP.Errored = false;
|
||||
ERP.Failed = false;
|
||||
ERP.Init();
|
||||
}
|
||||
return;
|
||||
}
|
||||
GUILayout.Label("Editor Rich Presence", EditorStyles.boldLabel);
|
||||
|
||||
GUILayout.Label("Current Project: " + ERP.projectName);
|
||||
GUILayout.Label("Current Scene: " + ERP.sceneName);
|
||||
GUILayout.Label(string.Empty);
|
||||
GUILayout.Label($"Scene Name Visible: {ERP.showSceneName}");
|
||||
GUILayout.Label($"Project Name Visible: {ERP.showProjectName}");
|
||||
GUILayout.Label($"Reset Timestap on scene change: {ERP.resetOnSceneChange}");
|
||||
|
||||
if (ToggleButton("Hide Scene name", "Show Scene name", ref ERP.showSceneName))
|
||||
{
|
||||
ERP.UpdateActivity();
|
||||
ERPSettings.SaveSettings();
|
||||
}
|
||||
if (ToggleButton("Hide Project name", "Show Project name", ref ERP.showProjectName))
|
||||
{
|
||||
ERP.UpdateActivity();
|
||||
ERPSettings.SaveSettings();
|
||||
}
|
||||
if (ToggleButton("Don't reset timestap on scene change", "Reset timestap on scene change", ref ERP.resetOnSceneChange))
|
||||
{
|
||||
ERP.UpdateActivity();
|
||||
ERPSettings.SaveSettings();
|
||||
}
|
||||
if (ToggleButton("Disable Debug Mode", "Enable Debug Mode", ref ERP.debugMode))
|
||||
{
|
||||
ERPSettings.SaveSettings();
|
||||
}
|
||||
GUILayout.Label(string.Empty);
|
||||
GUILayout.BeginHorizontal();
|
||||
if (GUILayout.Button("GitHub Repository"))
|
||||
{
|
||||
Application.OpenURL("https://github.com/MarshMello0/Editor-Rich-Presence");
|
||||
}
|
||||
if (GUILayout.Button("Asset Store Page"))
|
||||
{
|
||||
Application.OpenURL("https://assetstore.unity.com/packages/tools/utilities/editor-rich-presence-178736");
|
||||
}
|
||||
GUILayout.EndHorizontal();
|
||||
|
||||
}
|
||||
|
||||
private bool ToggleButton(string trueText, string falseText, ref bool value)
|
||||
{
|
||||
if (value && GUILayout.Button(trueText))
|
||||
{
|
||||
value = false;
|
||||
return true;
|
||||
}
|
||||
else if (!value && GUILayout.Button(falseText))
|
||||
{
|
||||
value = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
11
Unity-Files/Assets/ERP/Editor/ERPWindow.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/ERPWindow.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 59dfeb4cf2bfe5d40bc44adef75bc71c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Editor/Plugins.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Editor/Plugins.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2f9d30f2a57de249b316cd189be4165
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ce6f73dd7415ecd4aaa685f854de777e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace ERP.Discord
|
||||
{
|
||||
public partial class ActivityManager
|
||||
{
|
||||
public void RegisterCommand()
|
||||
{
|
||||
RegisterCommand(null);
|
||||
}
|
||||
}
|
||||
}
|
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/ActivityManager.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/ActivityManager.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bbf7726d48d669488894791799286e0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,9 @@
|
||||
using System;
|
||||
|
||||
namespace ERP.Discord
|
||||
{
|
||||
static class Constants
|
||||
{
|
||||
public const string DllName = "discord_game_sdk";
|
||||
}
|
||||
}
|
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/Constants.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/Constants.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b81933783bc3c2448c5d19141baea99
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
4199
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/Core.cs
Normal file
4199
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/Core.cs
Normal file
File diff suppressed because it is too large
Load Diff
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/Core.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/Core.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e67fa7bdd3cf6a34e9ef9b85b66e7f0a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
using UnityEngine;
|
||||
#endif
|
||||
|
||||
namespace ERP.Discord
|
||||
{
|
||||
public partial struct ImageHandle
|
||||
{
|
||||
static public ImageHandle User(Int64 id)
|
||||
{
|
||||
return User(id, 128);
|
||||
}
|
||||
|
||||
static public ImageHandle User(Int64 id, UInt32 size)
|
||||
{
|
||||
return new ImageHandle
|
||||
{
|
||||
Type = ImageType.User,
|
||||
Id = id,
|
||||
Size = size,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public partial class ImageManager
|
||||
{
|
||||
public void Fetch(ImageHandle handle, FetchHandler callback)
|
||||
{
|
||||
Fetch(handle, false, callback);
|
||||
}
|
||||
|
||||
public byte[] GetData(ImageHandle handle)
|
||||
{
|
||||
var dimensions = GetDimensions(handle);
|
||||
var data = new byte[dimensions.Width * dimensions.Height * 4];
|
||||
GetData(handle, data);
|
||||
return data;
|
||||
}
|
||||
|
||||
#if UNITY_EDITOR || UNITY_STANDALONE
|
||||
public Texture2D GetTexture(ImageHandle handle)
|
||||
{
|
||||
var dimensions = GetDimensions(handle);
|
||||
var texture = new Texture2D((int)dimensions.Width, (int)dimensions.Height, TextureFormat.RGBA32, false, true);
|
||||
texture.LoadRawTextureData(GetData(handle));
|
||||
texture.Apply();
|
||||
return texture;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/ImageManager.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/ImageManager.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a07e195a8d9505745a5ffd0ba2bb01e2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ERP.Discord
|
||||
{
|
||||
public partial class LobbyManager
|
||||
{
|
||||
public IEnumerable<User> GetMemberUsers(Int64 lobbyID)
|
||||
{
|
||||
var memberCount = MemberCount(lobbyID);
|
||||
var members = new List<User>();
|
||||
for (var i = 0; i < memberCount; i++)
|
||||
{
|
||||
members.Add(GetMemberUser(lobbyID, GetMemberUserId(lobbyID, i)));
|
||||
}
|
||||
return members;
|
||||
}
|
||||
|
||||
public void SendLobbyMessage(Int64 lobbyID, string data, SendLobbyMessageHandler handler)
|
||||
{
|
||||
SendLobbyMessage(lobbyID, Encoding.UTF8.GetBytes(data), handler);
|
||||
}
|
||||
}
|
||||
}
|
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/LobbyManager.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/LobbyManager.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d033386aa12b5434890ecd02dfb2486d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ERP.Discord
|
||||
{
|
||||
public partial class StorageManager
|
||||
{
|
||||
public IEnumerable<FileStat> Files()
|
||||
{
|
||||
var fileCount = Count();
|
||||
var files = new List<FileStat>();
|
||||
for (var i = 0; i < fileCount; i++)
|
||||
{
|
||||
files.Add(StatAt(i));
|
||||
}
|
||||
return files;
|
||||
}
|
||||
}
|
||||
}
|
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/StorageManager.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/StorageManager.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f117fb9d4ace5c34b8fd8cc721cca726
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace ERP.Discord
|
||||
{
|
||||
public partial class StoreManager
|
||||
{
|
||||
public IEnumerable<Entitlement> GetEntitlements()
|
||||
{
|
||||
var count = CountEntitlements();
|
||||
var entitlements = new List<Entitlement>();
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
entitlements.Add(GetEntitlementAt(i));
|
||||
}
|
||||
return entitlements;
|
||||
}
|
||||
|
||||
public IEnumerable<Sku> GetSkus()
|
||||
{
|
||||
var count = CountSkus();
|
||||
var skus = new List<Sku>();
|
||||
for (var i = 0; i < count; i++)
|
||||
{
|
||||
skus.Add(GetSkuAt(i));
|
||||
}
|
||||
return skus;
|
||||
}
|
||||
}
|
||||
}
|
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/StoreManager.cs.meta
generated
Normal file
11
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/StoreManager.cs.meta
generated
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88ddef408c40a034fb598224080b36e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6cf4f21b3c4cef54ebba8baf75884671
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86/discord_game_sdk.dll
(Stored with Git LFS)
Normal file
BIN
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86/discord_game_sdk.dll
(Stored with Git LFS)
Normal file
Binary file not shown.
80
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86/discord_game_sdk.dll.meta
generated
Normal file
80
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86/discord_game_sdk.dll.meta
generated
Normal file
@ -0,0 +1,80 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7cc1a84a3fca5524cb7bcb73f7c1aabd
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 0
|
||||
Exclude Linux: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude LinuxUniversal: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Facebook: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Facebook: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Linux
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86_64.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86_64.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 050e0629584e2d54cbf84f0e0ed91c69
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
BIN
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86_64/discord_game_sdk.dll
(Stored with Git LFS)
Normal file
BIN
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86_64/discord_game_sdk.dll
(Stored with Git LFS)
Normal file
Binary file not shown.
80
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86_64/discord_game_sdk.dll.meta
generated
Normal file
80
Unity-Files/Assets/ERP/Editor/Plugins/DiscordSDK/x86_64/discord_game_sdk.dll.meta
generated
Normal file
@ -0,0 +1,80 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1727ecd695a502444b36efd0e5dacd34
|
||||
PluginImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
iconMap: {}
|
||||
executionOrder: {}
|
||||
isPreloaded: 0
|
||||
isOverridable: 0
|
||||
platformData:
|
||||
- first:
|
||||
'': Any
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
Exclude Editor: 0
|
||||
Exclude Linux: 1
|
||||
Exclude Linux64: 1
|
||||
Exclude LinuxUniversal: 1
|
||||
Exclude OSXUniversal: 1
|
||||
Exclude Win: 1
|
||||
Exclude Win64: 1
|
||||
- first:
|
||||
Any:
|
||||
second:
|
||||
enabled: 0
|
||||
settings: {}
|
||||
- first:
|
||||
Editor: Editor
|
||||
second:
|
||||
enabled: 1
|
||||
settings:
|
||||
CPU: x86_64
|
||||
DefaultValueInitialized: true
|
||||
OS: AnyOS
|
||||
- first:
|
||||
Facebook: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Facebook: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Linux
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86
|
||||
- first:
|
||||
Standalone: Linux64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: x86_64
|
||||
- first:
|
||||
Standalone: OSXUniversal
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
- first:
|
||||
Standalone: Win64
|
||||
second:
|
||||
enabled: 0
|
||||
settings:
|
||||
CPU: AnyCPU
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Unity-Files/Assets/ERP/Editor/Scenes.meta
generated
Normal file
8
Unity-Files/Assets/ERP/Editor/Scenes.meta
generated
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 47a91a84510d64e4b83d9b05f706a282
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
123
Unity-Files/Assets/ERP/Editor/Scenes/ERP Example Scene.unity
generated
Normal file
123
Unity-Files/Assets/ERP/Editor/Scenes/ERP Example Scene.unity
generated
Normal file
@ -0,0 +1,123 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0.37311953, g: 0.38074014, b: 0.3587274, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 0
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 1
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
7
Unity-Files/Assets/ERP/Editor/Scenes/ERP Example Scene.unity.meta
generated
Normal file
7
Unity-Files/Assets/ERP/Editor/Scenes/ERP Example Scene.unity.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f577da1718f13db48822c8efd5f2dd52
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
13
Unity-Files/Assets/ERP/Editor/com.ben-w.erp.asmdef
Normal file
13
Unity-Files/Assets/ERP/Editor/com.ben-w.erp.asmdef
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "com.ben-w.erp",
|
||||
"references": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
7
Unity-Files/Assets/ERP/Editor/com.ben-w.erp.asmdef.meta
generated
Normal file
7
Unity-Files/Assets/ERP/Editor/com.ben-w.erp.asmdef.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5f94b3bb5603bb5489cba7d6df77444c
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
21
Unity-Files/Assets/ERP/LICENSE.md
Normal file
21
Unity-Files/Assets/ERP/LICENSE.md
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2020 Ben Wilson
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
7
Unity-Files/Assets/ERP/LICENSE.md.meta
generated
Normal file
7
Unity-Files/Assets/ERP/LICENSE.md.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1424d28e0eda2004a954efda604e22d7
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Unity-Files/Assets/ERP/README.md
Normal file
16
Unity-Files/Assets/ERP/README.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Editor Rich Presence
|
||||
## A Discord Rich Presence for the Unity editor
|
||||
|
||||

|
||||
|
||||
Show off what you're working on in unity with Editor Rich Presence on discord.
|
||||
|
||||

|
||||
|
||||
## Download
|
||||
|
||||
You can now download Editor Rich Presence from the Unity Asset store from [here](https://assetstore.unity.com/packages/tools/utilities/editor-rich-presence-178736)!
|
||||
|
||||
## Warning
|
||||
|
||||
This package makes a `.erp` file in the root of the project if you don't want this to be shared in a git repo add it to your ignore list.
|
7
Unity-Files/Assets/ERP/README.md.meta
generated
Normal file
7
Unity-Files/Assets/ERP/README.md.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7236ea587e9df0b4eb4779968f15f94f
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
17
Unity-Files/Assets/ERP/package.json
Normal file
17
Unity-Files/Assets/ERP/package.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "com.ben-w.erp",
|
||||
"version": "3.1.2",
|
||||
"displayName": "Editor Rich Presence",
|
||||
"description": "Show off what you're working on in Unity with Editor Rich Presence on discord.\n\nEditor Rich Presence uses Discords GameSDK to display your project name, current active scene name and session time on your Discord profile. These can be disabled on a per-project basis.",
|
||||
"keywords": [
|
||||
"Discord",
|
||||
"Rich Presense",
|
||||
"Editor Tool"
|
||||
],
|
||||
"author": {
|
||||
"name": "Ben Wilson",
|
||||
"email": "me@ben-w.com",
|
||||
"url": "https://github.com/MarshMello0/Editor-Rich-Presence"
|
||||
},
|
||||
"type": "tool"
|
||||
}
|
7
Unity-Files/Assets/ERP/package.json.meta
generated
Normal file
7
Unity-Files/Assets/ERP/package.json.meta
generated
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6c6f38634ca76649b31df0c339545c0
|
||||
PackageManifestImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
x
Reference in New Issue
Block a user