-
-
Notifications
You must be signed in to change notification settings - Fork 302
Configuring Discord Rich Presence (v1.7)
Written by @Lust
-
Go to the Discord Developers Portal (and log in with your Discord account).
-
Create a "New Application" (top right of the page), and give it the name that you want to show up in Discord: for example, "NSMB My Amazing Mod".
-
Once you created the Application head over to Rich Presence to the left and click on it,
-
You can add a Cover Image this Image will be the Game has ended. Image if Discord Game Invites was used for a session.
-
Under Rich Presence Assets you can add Images to the Levels showing up in the RPC and Main Menu, For Levels you Need to Name it level-(Rich Presence Id) e.g. level-grassland, to check what your Levels rich presence id is, or if you already had it, open a Level Scene in the Editor and go to the Inspector and check Rich Presence Id, if you put in a let's say Sewer Level, you can call it sewers so the Name would be level-sewer, for the main menu Picture, just call the uploaded Image mainmenu and your good to go!
Note: Changes to the uploaded images can take some time for Discord to properly cache. If you see an old or blank image, it is possible that Discord is still rolling out your changes. Alternatively, you might have named your image incorrectly.
-
Open Unity and go to
Assets/Scripts
and open theDiscordController.cs
script. -
Line 19 contains the Application ID used for the base game:
discord = new Discord.Discord(962073502469459999, (ulong) CreateFlags.NoRequireDiscord);
Replace the Application ID (
962073502469459999
) with the ID found in the Developer Portal under the "General Information" tab. Changing this will tell Discord to use your application's name and images, rather than the base game's.##
This is for changing the default text for the RPC: "Playing Online", "In a Public/Private Lobby", "Browsing the Main Menu...", etc.
-
Go back to the
DiscordController.cs
(inAssets/Scripts
). Everything related to the actual state (text, images, "Ask to Join" links) of the RPC is located under theUpdateActivity()
method, starting on Line 71. -
Change the text that gets assigned to
activity.Details
,activity.State
, andassets.LargeImage
(if you have custom images). If you can't find where a certain string is located, use Ctrl+F to search for it. -
Save the script's changes. When testing, make sure that your platform isn't set to "WebGL", as WebGL builds are not compatible with Discord RPC.