<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ue4 4.22 Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/tag/ue4-4-22/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/tag/ue4-4-22/</link>
	<description>Detailed Game Programming Tutorials</description>
	<lastBuildDate>Sun, 10 Jan 2021 23:53:53 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>

<image>
	<url>https://couchlearn.com/wp-content/uploads/2020/05/cropped-logolarge-32x32.png</url>
	<title>ue4 4.22 Archives - Couch Learn</title>
	<link>https://couchlearn.com/tag/ue4-4-22/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to use Discord Rich Presence in Unreal Engine 4</title>
		<link>https://couchlearn.com/how-to-use-discord-rich-presence-in-unreal-engine-4/</link>
					<comments>https://couchlearn.com/how-to-use-discord-rich-presence-in-unreal-engine-4/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 22 Aug 2019 23:53:35 +0000</pubDate>
				<category><![CDATA[Hard Difficulty]]></category>
		<category><![CDATA[Plugins]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[discord]]></category>
		<category><![CDATA[discord in game]]></category>
		<category><![CDATA[discord rich presence]]></category>
		<category><![CDATA[discord status]]></category>
		<category><![CDATA[discordrpc]]></category>
		<category><![CDATA[ue4 4.22]]></category>
		<category><![CDATA[ue4 discord]]></category>
		<category><![CDATA[unreal engine 4 discord]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=624</guid>

					<description><![CDATA[<p>Many modern games are adopting Discord&#8217;s Rich Presence features to display stats about your current game session to friends. In this guide we will be <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-use-discord-rich-presence-in-unreal-engine-4/" title="How to use Discord Rich Presence in Unreal Engine 4">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-use-discord-rich-presence-in-unreal-engine-4/">How to use Discord Rich Presence in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Many modern games are adopting Discord&#8217;s Rich Presence features to display stats about your current game session to friends.</p>



<p>In this guide we will be working through how to use Discord Rich Presence in Unreal Engine 4 by downloading, installing and implementing Discord RPC and Rich Presence into your Unreal Engine 4 project.</p>



<figure class="wp-block-image"><img fetchpriority="high" decoding="async" width="800" height="272" src="https://couchlearn.com/wp-content/uploads/2019/08/Discord-LogoWordmark-White.png" alt="discord logo" class="wp-image-771" srcset="https://couchlearn.com/wp-content/uploads/2019/08/Discord-LogoWordmark-White.png 800w, https://couchlearn.com/wp-content/uploads/2019/08/Discord-LogoWordmark-White-416x141.png 416w, https://couchlearn.com/wp-content/uploads/2019/08/Discord-LogoWordmark-White-300x102.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/Discord-LogoWordmark-White-768x261.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></figure>



<p><strong>Discord has released their newer GameSDK which runs entirely using either C# for Unity or C++ for Unreal Engine. GameSDK is beyond the scope for this difficulty level which is why we will be using Discord RPC.</strong></p>



<h2 class="wp-block-heading">Adding the Discord Plugin</h2>



<h3 class="wp-block-heading">Downloading the Discord Plugin</h3>



<p>Many features for Unreal Engine are built into the engine using C++ and others are compiled into a plugin. Discord has already prepared a ready made plugin for use with Unreal Engine on their GitHub page.</p>



<h4 class="wp-block-heading">Method 1:</h4>



<p class="has-text-align-center"><a href="https://github.com/discordapp/discord-rpc/archive/master.zip">Click here to download the Discord RPC master zip.</a> <br><strong>This file is hosted on the official Discord GitHub page and not CouchLearn.com</strong></p>



<p>After downloading, unzip the discord-rpc-master.zip file somewhere you can easily access it.   </p>



<h4 class="wp-block-heading">Method 2:</h4>



<p>If you would like to manually clone the repository yourself <a href="https://github.com/discordapp/discord-rpc">click here to visit Discord&#8217;s GitHub page.</a></p>



<figure class="wp-block-image"><img decoding="async" width="998" height="597" src="https://couchlearn.com/wp-content/uploads/2019/08/image.png" alt="discord official GitHub page" class="wp-image-674" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image.png 998w, https://couchlearn.com/wp-content/uploads/2019/08/image-300x179.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-768x459.png 768w" sizes="(max-width: 998px) 100vw, 998px" /></figure>



<h4 class="wp-block-heading">Library Files</h4>



<p>To download the library files necessary for compilation later on navigate to the releases section of the DiscordRPC GitHub page.</p>



<p class="has-text-align-center"><a href="https://github.com/discordapp/discord-rpc/releases">Click here to view the Releases</a></p>



<p class="has-text-align-center"><strong>This file is hosted on the official Discord GitHub page and not CouchLearn.com</strong></p>



<p>Find the latest release (Green text on the left) and download the discord-rpc-win.zip file.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="580" src="https://couchlearn.com/wp-content/uploads/2019/08/image-28-1024x580.png" alt="Discord library file download" class="wp-image-727" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-28-1024x580.png 1024w, https://couchlearn.com/wp-content/uploads/2019/08/image-28-300x170.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-28-768x435.png 768w, https://couchlearn.com/wp-content/uploads/2019/08/image-28.png 1234w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Unzip the discord-rpc-win.zip file somewhere you can easily access it.  </p>



<h3 class="wp-block-heading">Installing the Discord Plugin</h3>



<h4 class="wp-block-heading">Copying the Plugin</h4>



<p>In our project folder we need to make sure there is a Plugins folder.<br><br>Create a new folder in your project folder named Plugins. <br><br>If you already have this you can move onto the next step.</p>



<figure class="wp-block-image"><img decoding="async" width="737" height="179" src="https://couchlearn.com/wp-content/uploads/2019/08/image-14.png" alt="creating the plugins folder" class="wp-image-708" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-14.png 737w, https://couchlearn.com/wp-content/uploads/2019/08/image-14-300x73.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></figure>



<p>Included in the extracted discord RPC master folder is an example project for Unreal Engine 4. <br><br>This project has a pre-compiled Discord plugin ready for your project.<br><br>To find this plugin navigate to examples:</p>



<figure class="wp-block-image"><img decoding="async" width="750" height="341" src="https://couchlearn.com/wp-content/uploads/2019/08/image-15.png" alt="Discord rich presence examples from GitHub" class="wp-image-709" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-15.png 750w, https://couchlearn.com/wp-content/uploads/2019/08/image-15-300x136.png 300w" sizes="(max-width: 750px) 100vw, 750px" /></figure>



<p>Next, navigate to the unrealstatus folder:</p>



<figure class="wp-block-image"><img decoding="async" width="736" height="109" src="https://couchlearn.com/wp-content/uploads/2019/08/image-16.png" alt="Unreal Engine 4 discord example project" class="wp-image-710" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-16.png 736w, https://couchlearn.com/wp-content/uploads/2019/08/image-16-300x44.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></figure>



<p>Finally, navigate to the Plugins folder:</p>



<figure class="wp-block-image"><img decoding="async" width="735" height="174" src="https://couchlearn.com/wp-content/uploads/2019/08/image-17.png" alt="Plugins folder of the Discord Rich Presence Unreal Engine 4 example project" class="wp-image-711" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-17.png 735w, https://couchlearn.com/wp-content/uploads/2019/08/image-17-300x71.png 300w" sizes="(max-width: 735px) 100vw, 735px" /></figure>



<p>Inside the Plugins folder is a folder named discordrpc. We need to copy and paste this folder into our own project&#8217;s Plugins folder created earlier.</p>



<figure class="wp-block-image"><img decoding="async" width="729" height="44" src="https://couchlearn.com/wp-content/uploads/2019/08/image-18.png" alt="The folder to copy" class="wp-image-712" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-18.png 729w, https://couchlearn.com/wp-content/uploads/2019/08/image-18-300x18.png 300w" sizes="(max-width: 729px) 100vw, 729px" /></figure>



<p>After copying and pasting the discordrpc folder, our project&#8217;s Plugins folder now looks like this:</p>



<figure class="wp-block-image"><img decoding="async" width="788" height="140" src="https://couchlearn.com/wp-content/uploads/2019/08/image-19.png" alt="DiscordRPC folder copied to your project." class="wp-image-713" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-19.png 788w, https://couchlearn.com/wp-content/uploads/2019/08/image-19-300x53.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-19-768x136.png 768w" sizes="(max-width: 788px) 100vw, 788px" /></figure>



<h4 class="wp-block-heading">Copying files to Compile the plugin</h4>



<p>In the discord-rpc-master folder copy the include folder.</p>



<figure class="wp-block-image"><img decoding="async" width="743" height="352" src="https://couchlearn.com/wp-content/uploads/2019/08/image-22.png" alt="Finding the include folder and copying it" class="wp-image-721" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-22.png 743w, https://couchlearn.com/wp-content/uploads/2019/08/image-22-300x142.png 300w" sizes="(max-width: 743px) 100vw, 743px" /></figure>



<p>Navigate to the /ThirdParty/DiscordRpcLibrary folder in your project&#8217;s plugins folder and paste the include folder.</p>



<figure class="wp-block-image"><img decoding="async" width="769" height="166" src="https://couchlearn.com/wp-content/uploads/2019/08/image-23.png" alt="Pasting into the Library folder" class="wp-image-722" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-23.png 769w, https://couchlearn.com/wp-content/uploads/2019/08/image-23-300x65.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-23-768x166.png 768w" sizes="(max-width: 769px) 100vw, 769px" /></figure>



<p>Rename this folder to Include (make sure it has a capital I).</p>



<figure class="wp-block-image"><img decoding="async" width="785" height="149" src="https://couchlearn.com/wp-content/uploads/2019/08/image-25.png" alt="Renaming the include folder to Include" class="wp-image-724" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-25.png 785w, https://couchlearn.com/wp-content/uploads/2019/08/image-25-300x57.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-25-768x146.png 768w" sizes="(max-width: 785px) 100vw, 785px" /></figure>



<p>Create a new folder named Win64:</p>



<figure class="wp-block-image"><img decoding="async" width="771" height="175" src="https://couchlearn.com/wp-content/uploads/2019/08/image-26.png" alt="Creating the Win64 folder" class="wp-image-725" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-26.png 771w, https://couchlearn.com/wp-content/uploads/2019/08/image-26-300x68.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-26-768x174.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></figure>



<p>Navigate to the /win64-dynamic/lib folder then copy and paste the discord-rpc.lib file into the Win64 folder created in the last step.</p>



<figure class="wp-block-image"><img decoding="async" width="692" height="114" src="https://couchlearn.com/wp-content/uploads/2019/08/image-30.png" alt="Copying the .lib file" class="wp-image-730" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-30.png 692w, https://couchlearn.com/wp-content/uploads/2019/08/image-30-300x49.png 300w" sizes="(max-width: 692px) 100vw, 692px" /></figure>



<p>Navigate to the /win64-dynamic/bin folder then copy and paste the discord-rpc.dll file into the Win64 folder.</p>



<figure class="wp-block-image"><img decoding="async" width="771" height="144" src="https://couchlearn.com/wp-content/uploads/2019/08/image-31.png" alt="copying the .dll file" class="wp-image-732" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-31.png 771w, https://couchlearn.com/wp-content/uploads/2019/08/image-31-300x56.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-31-768x143.png 768w" sizes="(max-width: 771px) 100vw, 771px" /></figure>



<p>Once completed your Win64 folder will look like this:</p>



<figure class="wp-block-image"><img decoding="async" width="890" height="169" src="https://couchlearn.com/wp-content/uploads/2019/08/image-32.png" alt="The final Win64 folder" class="wp-image-733" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-32.png 890w, https://couchlearn.com/wp-content/uploads/2019/08/image-32-300x57.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-32-768x146.png 768w" sizes="(max-width: 890px) 100vw, 890px" /></figure>



<p><strong>To add Mac support for Discord to your Game </strong><a href="https://couchlearn.com/compile-and-package-discord-rich-presence-for-mac/"><strong>click the link here for our guide for Compiling and Packaging Discord on Mac OSX.</strong></a><br><br><strong>To add Linux support for Discord to your Game </strong><a href="https://couchlearn.com/compile-and-package-discord-rich-presence-for-linux/"><strong>click the link here for our guide for Compiling and Packaging Discord on Linux.</strong></a></p>



<h4 class="wp-block-heading">Compiling the Plugin</h4>



<p>The plugin is made ready but your project doesn&#8217;t know that the files are there and hasn&#8217;t created its own files in preparation. This is why we compile the plugin on the first launch.<br><br>To compile the plugin, firstly launch your project. <br><br>As your new plugin hasn&#8217;t been compiled for your project this new prompt will show.<br><br>Press Yes to compile the plugin for your project:</p>



<figure class="wp-block-image"><img decoding="async" width="486" height="247" src="https://couchlearn.com/wp-content/uploads/2019/08/image-20.png" alt="Compiling the DiscordRpc plugin" class="wp-image-715" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-20.png 486w, https://couchlearn.com/wp-content/uploads/2019/08/image-20-300x152.png 300w" sizes="(max-width: 486px) 100vw, 486px" /></figure>



<p>The compile window will show and display the progress. This process takes a few minutes upto 10 minutes depending on the size of your project.</p>



<figure class="wp-block-image"><img decoding="async" width="602" height="115" src="https://couchlearn.com/wp-content/uploads/2019/08/image-21.png" alt="Unreal Engine 4 progress bar building the plugin" class="wp-image-716" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-21.png 602w, https://couchlearn.com/wp-content/uploads/2019/08/image-21-300x57.png 300w" sizes="(max-width: 602px) 100vw, 602px" /></figure>



<h3 class="wp-block-heading">Enabling the Discord Plugin</h3>



<p>Once the editor has launched, navigate to the plugins section and scroll to the bottom.<br><br>In the messaging section make sure the Discord RPC plugin is enabled.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="552" src="https://couchlearn.com/wp-content/uploads/2019/08/image-33-1024x552.png" alt="Final plugin in the engine" class="wp-image-736" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-33-1024x552.png 1024w, https://couchlearn.com/wp-content/uploads/2019/08/image-33-300x162.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-33-768x414.png 768w, https://couchlearn.com/wp-content/uploads/2019/08/image-33.png 1258w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>If this plugin wasn&#8217;t enabled make sure to reload your editor after enabling it.</p>



<h2 class="wp-block-heading">Using Discord in your Blueprints</h2>



<h3 class="wp-block-heading">Creating the Discord Object</h3>



<p>In your Game Instance create a new variable named DiscordInstance and set its type to DiscordRPC object reference.</p>



<figure class="wp-block-image"><img decoding="async" width="755" height="402" src="https://couchlearn.com/wp-content/uploads/2019/08/image-39.png" alt="Creating the DiscordRPC object variable." class="wp-image-744" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-39.png 755w, https://couchlearn.com/wp-content/uploads/2019/08/image-39-300x160.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></figure>



<p>In your level blueprint, on the Begin Play event, create a Construct Object from Class node.</p>



<figure class="wp-block-image"><img decoding="async" width="775" height="205" src="https://couchlearn.com/wp-content/uploads/2019/08/image-35.png" alt="Constructing the discord rpc object class" class="wp-image-739" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-35.png 775w, https://couchlearn.com/wp-content/uploads/2019/08/image-35-300x79.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-35-768x203.png 768w" sizes="(max-width: 775px) 100vw, 775px" /></figure>



<p>For the Class node select the DiscordRpc class.</p>



<figure class="wp-block-image"><img decoding="async" width="630" height="261" src="https://couchlearn.com/wp-content/uploads/2019/08/image-36.png" alt="Setting the construct to the DiscordRPC object class" class="wp-image-740" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-36.png 630w, https://couchlearn.com/wp-content/uploads/2019/08/image-36-300x124.png 300w" sizes="(max-width: 630px) 100vw, 630px" /></figure>



<p>The outer pin is the owner of the DiscordRPC object. This should be set to your Game Instance.</p>



<figure class="wp-block-image"><img decoding="async" width="646" height="380" src="https://couchlearn.com/wp-content/uploads/2019/08/image-37.png" alt="Setting the outer (owner) to the game instance" class="wp-image-741" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-37.png 646w, https://couchlearn.com/wp-content/uploads/2019/08/image-37-300x176.png 300w" sizes="(max-width: 646px) 100vw, 646px" /></figure>



<p>Create a Cast node to your Game Instance.</p>



<figure class="wp-block-image"><img decoding="async" width="976" height="311" src="https://couchlearn.com/wp-content/uploads/2019/08/image-38.png" alt="Casting to the game instance" class="wp-image-743" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-38.png 976w, https://couchlearn.com/wp-content/uploads/2019/08/image-38-300x96.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-38-768x245.png 768w" sizes="(max-width: 976px) 100vw, 976px" /></figure>



<p>Set the DiscordInstance variable from your Game Instance to the return value of the Construct Discord RPC node.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="311" src="https://couchlearn.com/wp-content/uploads/2019/08/image-40-1024x311.png" alt="Setting the discord instance variable to the constructed DiscordRpc class" class="wp-image-745" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-40-1024x311.png 1024w, https://couchlearn.com/wp-content/uploads/2019/08/image-40-300x91.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-40-768x233.png 768w, https://couchlearn.com/wp-content/uploads/2019/08/image-40.png 1093w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Initializing the Connection</h3>



<p>The Discord client needs to be notified to recieve any Rich Presence information. To notify the client, firstly create an Initialize Connection node.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="333" src="https://couchlearn.com/wp-content/uploads/2019/08/image-41-1024x333.png" alt="Initializing the connection to discord" class="wp-image-748" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-41-1024x333.png 1024w, https://couchlearn.com/wp-content/uploads/2019/08/image-41-300x98.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-41-768x250.png 768w, https://couchlearn.com/wp-content/uploads/2019/08/image-41.png 1061w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In the Application Id pin, copy and paste your client id from the Discord Developer Portal.</p>



<figure class="wp-block-image"><img decoding="async" width="918" height="237" src="https://couchlearn.com/wp-content/uploads/2019/08/image-43.png" alt="Retrieving the Client ID" class="wp-image-750" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-43.png 918w, https://couchlearn.com/wp-content/uploads/2019/08/image-43-416x107.png 416w, https://couchlearn.com/wp-content/uploads/2019/08/image-43-300x77.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-43-768x198.png 768w" sizes="(max-width: 918px) 100vw, 918px" /></figure>



<figure class="wp-block-image"><img decoding="async" width="603" height="351" src="https://couchlearn.com/wp-content/uploads/2019/08/image-42.png" alt="Setting the Client ID into the game" class="wp-image-749" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-42.png 603w, https://couchlearn.com/wp-content/uploads/2019/08/image-42-300x175.png 300w" sizes="(max-width: 603px) 100vw, 603px" /></figure>



<h3 class="wp-block-heading">Setting Discord Presence Information</h3>



<p>Before sending the rich presence information to Discord, we need to set the variable containing the message that will be sent.</p>



<p>To set this create a Set Rich Presence Info node from the Discord Instance variable.</p>



<figure class="wp-block-image"><img decoding="async" width="753" height="395" src="https://couchlearn.com/wp-content/uploads/2019/08/image-44.png" alt="Setting the rich presence information" class="wp-image-752" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-44.png 753w, https://couchlearn.com/wp-content/uploads/2019/08/image-44-416x218.png 416w, https://couchlearn.com/wp-content/uploads/2019/08/image-44-300x157.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></figure>



<p>Right clicking and clicking break pin on the input pin of the new Set Rich Presence Info will show all the possible settings.<br><br>With this node created the entire Rich Presence data can now be set.</p>



<figure class="wp-block-image"><img decoding="async" width="277" height="672" src="https://couchlearn.com/wp-content/uploads/2019/08/image-46.png" alt="Full list of rich presence information" class="wp-image-754" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-46.png 277w, https://couchlearn.com/wp-content/uploads/2019/08/image-46-124x300.png 124w" sizes="(max-width: 277px) 100vw, 277px" /></figure>



<h4 class="wp-block-heading">Formatting</h4>



<p>The formatting is very specific as certain strings in the Set Rich Presence Info node are used for the Discord UI elements.</p>



<p>Below is the formatting from the Discord Developer page on Rich Presence.</p>



<figure class="wp-block-image"><img decoding="async" src="https://discordapp.com/assets/43bef54c8aee2bc0fd1c717d5f8ae28a.png" alt="Discord Rich Presence formatting"/><figcaption>Image Credit: https://discordapp.com/developers/docs/rich-presence/how-to</figcaption></figure>



<p>Complete the Rich Presence information in the Set Rich Presence Info node with the formatting above.</p>



<h4 class="wp-block-heading">Setting up the Timestamp (Advanced)</h4>



<p>If your game needs to show the duration of play, follow this next section to setup the timestamp.<br><br>Discord uses the UNIX epoch system for time. Unreal Engine 4 has no built in blueprint nodes for getting the UNIX epoch time so we will have to create a few nodes to compensate for this.</p>



<p>Create the blueprint nodes below and connect the truncate return value to the start timestamp to count up showing duration of play since starting the game.</p>



<figure class="wp-block-image"><img decoding="async" width="944" height="528" src="https://couchlearn.com/wp-content/uploads/2019/08/image-48.png" alt="Creating the correct UNIX epoch timestamp" class="wp-image-759" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-48.png 944w, https://couchlearn.com/wp-content/uploads/2019/08/image-48-416x233.png 416w, https://couchlearn.com/wp-content/uploads/2019/08/image-48-300x168.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-48-768x430.png 768w" sizes="(max-width: 944px) 100vw, 944px" /></figure>



<h4 class="wp-block-heading">Using Images</h4>



<p>To add an image to your Discord App, go to the Discord Developer Portal and in the Rich Presence art assets section upload the images your game requires.</p>



<figure class="wp-block-image"><img decoding="async" width="1024" height="350" src="https://couchlearn.com/wp-content/uploads/2019/08/image-47-1024x350.png" alt="Uploading images to the Discord Developer Portal" class="wp-image-756" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-47-1024x350.png 1024w, https://couchlearn.com/wp-content/uploads/2019/08/image-47-416x142.png 416w, https://couchlearn.com/wp-content/uploads/2019/08/image-47-300x102.png 300w, https://couchlearn.com/wp-content/uploads/2019/08/image-47-768x262.png 768w, https://couchlearn.com/wp-content/uploads/2019/08/image-47.png 1613w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The uploaded file&#8217;s name is the key name used for the Set Rich Presence Info node. I used the Unreal Engine logo and the key is ue4logo shown above.</p>



<figure class="wp-block-image"><img decoding="async" width="369" height="60" src="https://couchlearn.com/wp-content/uploads/2019/08/image-49.png" alt="Adding the image key to the game" class="wp-image-760" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-49.png 369w, https://couchlearn.com/wp-content/uploads/2019/08/image-49-300x49.png 300w" sizes="(max-width: 369px) 100vw, 369px" /></figure>



<h3 class="wp-block-heading">Sending information to the Discord Client</h3>



<p>To send the rich presence information simply create a Send Presence node from the DiscordInstance variable as the target. Once you load your level the discord information will appear.</p>



<figure class="wp-block-image"><img decoding="async" width="461" height="708" src="https://couchlearn.com/wp-content/uploads/2019/08/image-50.png" alt="The complete Rich Presence information being sent" class="wp-image-761" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-50.png 461w, https://couchlearn.com/wp-content/uploads/2019/08/image-50-416x639.png 416w, https://couchlearn.com/wp-content/uploads/2019/08/image-50-195x300.png 195w" sizes="(max-width: 461px) 100vw, 461px" /></figure>



<p>Here&#8217;s the final result using the settings above:</p>



<figure class="wp-block-image"><img decoding="async" width="301" height="135" src="https://couchlearn.com/wp-content/uploads/2019/08/image-51.png" alt="The rich presence data from the Discord client showing in game data" class="wp-image-762" srcset="https://couchlearn.com/wp-content/uploads/2019/08/image-51.png 301w, https://couchlearn.com/wp-content/uploads/2019/08/image-51-300x135.png 300w" sizes="(max-width: 301px) 100vw, 301px" /></figure>



<figure class="wp-block-image"><img decoding="async" width="189" height="22" src="https://couchlearn.com/wp-content/uploads/2019/08/image-52.png" alt="Label showing the discord app project name" class="wp-image-763"/></figure>



<h2 class="wp-block-heading">Conclusion</h2>



<p>Your game now has full use of Discord&#8217;s Rich Presence system in Unreal Engine 4!<br><br>Setting the presence data based on current level or your characters situation can then be used to update the client based on their current session. <strong>Just make sure to send the presence data once you have set it!</strong></p>



<p>This is my largest and most comprehensive guide yet. If you found this helpful, please share with friends, other developers or on social media as more guides are coming soon.<br><br>If you want a specific guide, more guides of a specific difficulty or even different engine guides contact CouchLearn using the Contact Us link at the top of the site.</p>



<p>For more information on Discord Rich Presence system, <a href="https://discordapp.com/developers/docs/rich-presence/how-to">click here for the full documentation.</a></p>
<p>The post <a href="https://couchlearn.com/how-to-use-discord-rich-presence-in-unreal-engine-4/">How to use Discord Rich Presence in Unreal Engine 4</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-use-discord-rich-presence-in-unreal-engine-4/feed/</wfw:commentRss>
			<slash:comments>62</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/

Page Caching using Disk: Enhanced 
Minified using Disk

Served from: couchlearn.com @ 2026-04-11 13:09:03 by W3 Total Cache
-->