Responsive Image

Unity Editor Discord Rich Presence

7th November 2018

I wanted to make some sort of tool for unity, not something which would be in a game but something which would be used in the editor but it just needed to be a short simple idea I could just do in a few days. I ended up coming up with the idea of creating a something which would display Discords Rich Presence while you are in Unity, I thought of this as on my visual studio and visual studio code there are plugins which do this for those software but I couldn't seem to find anything for unity (with only a quick search on the internet).

Responsive Image An example of what discords rich presence looks like with the visual studio code plugin
I have added discord rich presence to other projects for fun so I already had an idea how to add it to a unity project and get it working, I just had to learn how to code something for the Unity editor instead of runtime and I also have had a brief look into publishing assets on to the assets store before so I had a vague idea of how I needed to create this so I jumped right into Unity and created a new project with the first name which came into my head "UnityEditorDiscordRichPresence", a bit of a mouth full.
Responsive Image The files after installing the discord rpc and creating the script to call the rpc
Got the discord rpc set up and working then starting on the main part, code for the editor to call the discord rpc, I first wanted just to get some drop-down menu from the top bar which I knew was a simple one line of code but I had only done it once before so after a few minutes of searching around on the internet I finally found it.
[MenuItem("EditorRichPresence/Enable Rich Presence")]
Once I had my menu at the top the rest I already had experience in as I have created a discord rich presence for a previous project, so then I managed to get a working in a few days. Next, I am going to be working on the art and testing to it to see if its ready to release it.