<?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>Couch Learn</title>
	<atom:link href="https://couchlearn.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/</link>
	<description>Detailed Game Programming Tutorials</description>
	<lastBuildDate>Mon, 26 May 2025 13:18:06 +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>Couch Learn</title>
	<link>https://couchlearn.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to build a Dedicated Server for your Unreal Engine 5 Game</title>
		<link>https://couchlearn.com/how-to-build-a-dedicated-server-for-your-unreal-engine-5-game/</link>
					<comments>https://couchlearn.com/how-to-build-a-dedicated-server-for-your-unreal-engine-5-game/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 22 May 2025 19:44:04 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Hard Difficulty]]></category>
		<category><![CDATA[Multiplayer]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[dedicated server]]></category>
		<category><![CDATA[hard difficulty]]></category>
		<category><![CDATA[How to build a Dedicated Server for your Unreal Engine 5 Game]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[UE5 source build]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=800</guid>

					<description><![CDATA[<p>Setting up a dedicated server for your Unreal Engine 5 game is a crucial step if you&#8217;re aiming to support multiplayer gameplay at scale. Whether <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-build-a-dedicated-server-for-your-unreal-engine-5-game/" title="How to build a Dedicated Server for your Unreal Engine 5 Game">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-build-a-dedicated-server-for-your-unreal-engine-5-game/">How to build a Dedicated Server for your Unreal Engine 5 Game</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Setting up a dedicated server for your Unreal Engine 5 game is a crucial step if you&#8217;re aiming to support multiplayer gameplay at scale. <br><br>Whether you&#8217;re building a competitive shooter, a cooperative survival experience, or a social sandbox, using a dedicated server ensures better performance, security, and reliability compared to peer to peer hosting. <br><br>It allows your players to connect to a centralized game instance that runs independently of any single player&#8217;s device.<br><br>In this guide, you’ll learn how to build and configure a dedicated server for your Unreal Engine 5 project from start to finish. <br><br>We’ll cover everything from preparing your project settings to compiling the server and running it locally!</p>



<figure class="wp-block-pullquote"><blockquote><p>This guide builds a dedicated server based upon our Unreal Engine 5 Multiplayer Sessions guide. <br><a href="https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/">Click here to follow our guide on Multiplayer Sessions in Unreal Engine 5.</a></p></blockquote></figure>



<figure class="wp-block-pullquote"><blockquote><p><a href="https://couchlearn.gumroad.com/l/objlo">Click here to download the project files for this guide</a></p></blockquote></figure>



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



<p>Before starting this guide you will need a working multiplayer Unreal Engine 5 project and a <strong>source build of Unreal Engine</strong>.</p>



<figure class="wp-block-pullquote"><blockquote><p>If you do not have a multiplayer ready project <a href="https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/">click here to follow our guide on Multiplayer Sessions in Unreal Engine 5.</a></p></blockquote></figure>



<figure class="wp-block-pullquote"><blockquote><p>You <strong>must</strong> have a version of Unreal Engine built from source and <strong>not</strong> downloaded from the Epic Games Launcher to build a dedicated server. <a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/downloading-source-code-in-unreal-engine">Click here to read how to build a source version of the engine.</a></p></blockquote></figure>



<figure class="wp-block-pullquote"><blockquote><p>You <strong>MUST</strong> have the AdvancedSessions plugin installed on your project for your server to <strong>show in the session browser correctly!</strong> <a href="https://vreue4.com/advanced-sessions-binaries">Click here to download the AdvancedSessions plugin.</a></p></blockquote></figure>



<h2 class="wp-block-heading">What is a Dedicated Server?</h2>



<p>A <strong>dedicated server</strong>, in game development terms, is a computer that can run a standalone piece of software which only handles the game world and server code. <br><br>It <strong>does not spawn a player character</strong> and does not count as a connected player.</p>



<p>The first method when setting up networking in a multiplayer game for many is a listen server.<br><br>A <strong>listen server</strong> is perfect for many styles of multiplayer games as it works well with games with small player counts per server (2 to 16), keeps costs down for developers and make developing features easier with faster testing between two clients.<br><br>For some games this isn&#8217;t ideal as players might cheat, have sync inconsistencies between clients that would be game breaking (fighting games over large latency) and larger scale games causing the host machine to slow down impacting other player&#8217;s experiences.<br><br>Dedicated servers are perfect to remedy these issues. Running the files that we will be creating on its own machine, with ports setup correctly, will only process your game world and keep an server of your game running 24/7.</p>



<h2 class="wp-block-heading">Automatic Session</h2>



<p>We need our server to automatically create a session and then load the map on launch.<br><br>In our example project, which can be downloaded in a <a href="https://couchlearn.gumroad.com/l/ipoxq">first person</a> or <a href="https://couchlearn.gumroad.com/l/mmshe">third person</a> format, we create our MainMenu widget and add it to the screen in our main menu level blueprint.<br><br>We need to adjust this so if it is a dedicated server then we ignore the menus entirely and create a session for our players to join!</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="1005" height="295" src="https://couchlearn.com/wp-content/uploads/2025/05/image-20.png" alt="The example project main menu widget creation" class="wp-image-2311" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-20.png 1005w, https://couchlearn.com/wp-content/uploads/2025/05/image-20-300x88.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-20-768x225.png 768w" sizes="(max-width: 1005px) 100vw, 1005px" /></figure>



<p>To achieve this, we simply add a branch and an &#8220;Is Dedicated Server&#8221; node before our widget creation. <br><br>This is then connected together on the False pin as we don&#8217;t want the code to run if our platform is &#8220;Dedicated Server&#8221;.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="226" src="https://couchlearn.com/wp-content/uploads/2025/05/image-21-1024x226.png" alt="Adding the Is Dedicated Server check to the main menu creation" class="wp-image-2312" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-21-1024x226.png 1024w, https://couchlearn.com/wp-content/uploads/2025/05/image-21-300x66.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-21-768x170.png 768w, https://couchlearn.com/wp-content/uploads/2025/05/image-21.png 1073w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>On the True pin we then add a Create Advanced Session node with our desired settings.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="736" height="540" src="https://couchlearn.com/wp-content/uploads/2025/05/image-34.png" alt="Creating the advanced session" class="wp-image-2344" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-34.png 736w, https://couchlearn.com/wp-content/uploads/2025/05/image-34-300x220.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-34-80x60.png 80w" sizes="(max-width: 736px) 100vw, 736px" /></figure>



<p>If our session creation was a success we then open our level with the option ?listen so that our server can accept connections to the map.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="903" height="543" src="https://couchlearn.com/wp-content/uploads/2025/05/image-35.png" alt="Opening the level after creating our session successfully" class="wp-image-2345" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-35.png 903w, https://couchlearn.com/wp-content/uploads/2025/05/image-35-300x180.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-35-768x462.png 768w" sizes="(max-width: 903px) 100vw, 903px" /></figure>



<p>Lastly, we compile and save our changes!</p>



<h2 class="wp-block-heading">Choosing the Default Server Map</h2>



<p>By default our dedicated server loads into an engine map called &#8220;Entry&#8221;. We need to change this to our own map to ensure that we can load players into the game.<br><br>Firstly, open the edit menu in the top left and then click Project Settings.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="520" height="355" src="https://couchlearn.com/wp-content/uploads/2025/05/image-30.png" alt="Opening the project settings" class="wp-image-2334" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-30.png 520w, https://couchlearn.com/wp-content/uploads/2025/05/image-30-300x205.png 300w" sizes="(max-width: 520px) 100vw, 520px" /></figure>



<p>We then click the &#8220;Maps &amp; Modes&#8221; section of the Project Settings.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="315" height="273" src="https://couchlearn.com/wp-content/uploads/2025/05/image-31.png" alt="Going into the maps and modes section" class="wp-image-2335" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-31.png 315w, https://couchlearn.com/wp-content/uploads/2025/05/image-31-300x260.png 300w" sizes="(max-width: 315px) 100vw, 315px" /></figure>



<p>We then click the Advanced drop down option in the &#8220;Default Maps&#8221; section.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="290" height="235" src="https://couchlearn.com/wp-content/uploads/2025/05/image-32.png" alt="Opening the advanced menu" class="wp-image-2336"/></figure>



<p>Finally, set the &#8220;Server Default Map&#8221; option to the map that you want to start your server on. In this case we are using our &#8220;menu&#8221; map and making changes later in the guide to add dedicated server functionality.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="915" height="235" src="https://couchlearn.com/wp-content/uploads/2025/05/image-33.png" alt="Setting the server default map" class="wp-image-2338" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-33.png 915w, https://couchlearn.com/wp-content/uploads/2025/05/image-33-300x77.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-33-768x197.png 768w" sizes="(max-width: 915px) 100vw, 915px" /></figure>



<h2 class="wp-block-heading">No Default Character in the Level</h2>



<p>As we are using a dedicated server, we no longer need a character spawned for the authority (server host). <br><br>Our level has a character blueprint inside of the level that gets controlled by the first player connected. <br><br>We need to remove this to prevent a character standing in the level with no player!</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="869" height="443" src="https://couchlearn.com/wp-content/uploads/2025/05/image-40.png" alt="Deleting the default character" class="wp-image-2352" style="width:771px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-40.png 869w, https://couchlearn.com/wp-content/uploads/2025/05/image-40-300x153.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-40-768x392.png 768w" sizes="(max-width: 869px) 100vw, 869px" /></figure>



<h2 class="wp-block-heading">The Project Launcher</h2>



<p>The project launcher is a built in tool of Unreal Engine that allows you to build versions of your game based on profiles that you can create.<br><br>One of the abilities of the project launcher is the dedicated server!</p>



<p>We can open the project launcher by opening the Tools menu at the top of the editor window and selecting the Project Launcher in the tools section of the menu.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="682" src="https://couchlearn.com/wp-content/uploads/2025/05/image-5-1024x682.png" alt="Opening the tools menu then the project launcher" class="wp-image-2289" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-5-1024x682.png 1024w, https://couchlearn.com/wp-content/uploads/2025/05/image-5-300x200.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-5-768x511.png 768w, https://couchlearn.com/wp-content/uploads/2025/05/image-5.png 1227w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>You should now see a large empty menu! We now need to add our custom profile for our game!</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="547" src="https://couchlearn.com/wp-content/uploads/2025/05/image-6-1024x547.png" alt="The empty project launcher menu" class="wp-image-2290" style="width:652px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-6-1024x547.png 1024w, https://couchlearn.com/wp-content/uploads/2025/05/image-6-300x160.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-6-768x410.png 768w, https://couchlearn.com/wp-content/uploads/2025/05/image-6-1536x820.png 1536w, https://couchlearn.com/wp-content/uploads/2025/05/image-6.png 1926w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>We need to create our <strong>custom profile</strong> to specify to the engine that we want a dedicated server build.</p>



<figure class="wp-block-image"><img decoding="async" width="149" height="90" src="https://couchlearn.com/wp-content/uploads/2019/09/image-1.png" alt="Adding a new profile" class="wp-image-809"/></figure>



<h3 class="wp-block-heading">Creating the Custom Profile</h3>



<p>Firstly, click the Add button in the bottom right, then click &#8220;Create Custom Profile&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="357" height="349" src="https://couchlearn.com/wp-content/uploads/2025/05/image-7.png" alt="Clicking the add button and create custom profile" class="wp-image-2291" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-7.png 357w, https://couchlearn.com/wp-content/uploads/2025/05/image-7-300x293.png 300w" sizes="(max-width: 357px) 100vw, 357px" /></figure>



<p>You should now see a large menu of options appear.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="480" src="https://couchlearn.com/wp-content/uploads/2025/05/image-8-1024x480.png" alt="The large menu of options for a custom launch profile" class="wp-image-2292" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-8-1024x480.png 1024w, https://couchlearn.com/wp-content/uploads/2025/05/image-8-300x141.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-8-768x360.png 768w, https://couchlearn.com/wp-content/uploads/2025/05/image-8-1536x720.png 1536w, https://couchlearn.com/wp-content/uploads/2025/05/image-8.png 1915w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In the cook section, we need to open the drop down menu and change &#8220;On the fly&#8221; to &#8220;By the book&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="765" height="147" src="https://couchlearn.com/wp-content/uploads/2025/05/image-9.png" alt="Changing the cook option from on the fly to by the book" class="wp-image-2293" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-9.png 765w, https://couchlearn.com/wp-content/uploads/2025/05/image-9-300x58.png 300w" sizes="(max-width: 765px) 100vw, 765px" /></figure>



<p>We then scroll down the Cooked Platforms list and find the server platform we want to build for. For this guide we are building a dedicated server for Windows. <br><br>You can choose LinuxServer if you need an x86/64 Linux server or LinuxArm64 if you want to host your server on Linux Arm. If you do not understand this, simply choose WindowsServer.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="799" height="726" src="https://couchlearn.com/wp-content/uploads/2025/05/image-10.png" alt="Enabling the WindowServer cook option" class="wp-image-2294" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-10.png 799w, https://couchlearn.com/wp-content/uploads/2025/05/image-10-300x273.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-10-768x698.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></figure>



<p>We then scroll down further and select all of the maps that you want to include in your server. In this guide we have selected both of the maps in the Unreal Engine 5</p>



<figure class="wp-block-image size-full"><img decoding="async" width="799" height="726" src="https://couchlearn.com/wp-content/uploads/2025/05/image-11.png" alt="Adding our maps to the cook" class="wp-image-2295" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-11.png 799w, https://couchlearn.com/wp-content/uploads/2025/05/image-11-300x273.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-11-768x698.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></figure>



<p>Next in the Package section, click the drop down menu and change &#8220;Do not package&#8221; to &#8220;Package &amp; store locally&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="795" height="378" src="https://couchlearn.com/wp-content/uploads/2025/05/image-12.png" alt="Changing the package options from Do not package to Package &amp; store locally" class="wp-image-2297" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-12.png 795w, https://couchlearn.com/wp-content/uploads/2025/05/image-12-300x143.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-12-768x365.png 768w" sizes="(max-width: 795px) 100vw, 795px" /></figure>



<p>This then generates you a default path inside of your project folder to build the server. This can be changed to anywhere you want using the directory picker &#8220;Browse&#8221; button.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="749" height="269" src="https://couchlearn.com/wp-content/uploads/2025/05/image-13.png" alt="The option to change the location the dedicated server is building in." class="wp-image-2298" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-13.png 749w, https://couchlearn.com/wp-content/uploads/2025/05/image-13-300x108.png 300w" sizes="(max-width: 749px) 100vw, 749px" /></figure>



<p>Then, in the Deploy section, click the drop down menu and change &#8220;Copy to device&#8221; to &#8220;Do not deploy&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="789" height="174" src="https://couchlearn.com/wp-content/uploads/2025/05/image-14.png" alt="Changing the deploy option from Copy to device to Do not deploy" class="wp-image-2300" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-14.png 789w, https://couchlearn.com/wp-content/uploads/2025/05/image-14-300x66.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-14-768x169.png 768w" sizes="(max-width: 789px) 100vw, 789px" /></figure>



<p>Finally, we can give our new profile a name to remember what this Profile builds.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="790" height="258" src="https://couchlearn.com/wp-content/uploads/2025/05/image-15.png" alt="Giving our profile a name" class="wp-image-2301" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-15.png 790w, https://couchlearn.com/wp-content/uploads/2025/05/image-15-300x98.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-15-768x251.png 768w" sizes="(max-width: 790px) 100vw, 790px" /></figure>



<h2 class="wp-block-heading">Creating the Dedicated Server</h2>



<p>Now that we have our profile all setup, we can now build our dedicated server!<br><br>Click the back button to return to the main Project Launcher menu.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="794" height="266" src="https://couchlearn.com/wp-content/uploads/2025/05/image-16.png" alt="Going back to the main project launcher menu" class="wp-image-2303" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-16.png 794w, https://couchlearn.com/wp-content/uploads/2025/05/image-16-300x101.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-16-768x257.png 768w" sizes="(max-width: 794px) 100vw, 794px" /></figure>



<p>We can now see our new profile in the list of custom launch profiles.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="799" height="184" src="https://couchlearn.com/wp-content/uploads/2025/05/image-17.png" alt="The newly created launch profile" class="wp-image-2304" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-17.png 799w, https://couchlearn.com/wp-content/uploads/2025/05/image-17-300x69.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-17-768x177.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></figure>



<h3 class="wp-block-heading">Building the Files</h3>



<p>To build the dedicated server using our custom profile, simply press the launch button (Controller and display icon). </p>



<figure class="wp-block-image size-full"><img decoding="async" width="784" height="726" src="https://couchlearn.com/wp-content/uploads/2025/05/image-18.png" alt="Launching the custom launch profile" class="wp-image-2305" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-18.png 784w, https://couchlearn.com/wp-content/uploads/2025/05/image-18-300x278.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-18-768x711.png 768w" sizes="(max-width: 784px) 100vw, 784px" /></figure>



<p>You now see the process of your dedicated server automatically building!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="799" height="617" src="https://couchlearn.com/wp-content/uploads/2025/05/image-19.png" alt="The progress and debug logging of the engine building the custom profile dedicated server" class="wp-image-2306" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-19.png 799w, https://couchlearn.com/wp-content/uploads/2025/05/image-19-300x232.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-19-768x593.png 768w" sizes="(max-width: 799px) 100vw, 799px" /></figure>



<p>Now wait until the process has completed. The first time you run your profile it can take a long time. Leave this to fully complete before moving onto the final step!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="872" height="726" src="https://couchlearn.com/wp-content/uploads/2025/05/image-26.png" alt="The build complete showing success for each task" class="wp-image-2327" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-26.png 872w, https://couchlearn.com/wp-content/uploads/2025/05/image-26-300x250.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-26-768x639.png 768w" sizes="(max-width: 872px) 100vw, 872px" /></figure>



<h3 class="wp-block-heading">Testing the Dedicated Server</h3>



<p>Now that our dedicated server has built successfully, navigate to the folder you selected earlier to see the executable.<br><br>If you left this option default in the previous step, the folder found in your project folder then <strong>Saved/StagedBuilds</strong> and then the platform name. In this case &#8220;<strong>WindowsServer</strong>&#8220;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="650" height="195" src="https://couchlearn.com/wp-content/uploads/2025/05/image-27.png" alt="The final files of the dedicated server" class="wp-image-2329" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-27.png 650w, https://couchlearn.com/wp-content/uploads/2025/05/image-27-300x90.png 300w" sizes="(max-width: 650px) 100vw, 650px" /></figure>



<p>From here we can open our Server.exe to open the server. This will open in the background and is hard to monitor and close.<br><br>To make this easier to use, firstly create a shortcut in Windows for your server executable.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="616" height="194" src="https://couchlearn.com/wp-content/uploads/2025/05/image-28.png" alt="Adding a shortcut to the executable" class="wp-image-2332" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-28.png 616w, https://couchlearn.com/wp-content/uploads/2025/05/image-28-300x94.png 300w" sizes="(max-width: 616px) 100vw, 616px" /></figure>



<p>We then open the executable and add the &#8220;-log&#8221; launch option to the end of the target section. This will make the server open as a window and print any logging messages on to the screen.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="363" height="228" src="https://couchlearn.com/wp-content/uploads/2025/05/image-29.png" alt="Adding the -log argument to ensure that the server opens with a window" class="wp-image-2333" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-29.png 363w, https://couchlearn.com/wp-content/uploads/2025/05/image-29-300x188.png 300w" sizes="(max-width: 363px) 100vw, 363px" /></figure>



<p>Now open the shortcut to your server and text will fill the window. This is your server initializing and setting up a session for your players to join!</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="465" src="https://couchlearn.com/wp-content/uploads/2025/05/image-42-1024x465.png" alt="The server launched and ready for clients to connect" class="wp-image-2355" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-42-1024x465.png 1024w, https://couchlearn.com/wp-content/uploads/2025/05/image-42-300x136.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-42-768x349.png 768w, https://couchlearn.com/wp-content/uploads/2025/05/image-42.png 1039w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>On the client&#8217;s view it now shows the dedicated server session!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="937" height="353" src="https://couchlearn.com/wp-content/uploads/2025/05/image-39.png" alt="Connecting to the dedicated server session" class="wp-image-2351" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-39.png 937w, https://couchlearn.com/wp-content/uploads/2025/05/image-39-300x113.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-39-768x289.png 768w" sizes="(max-width: 937px) 100vw, 937px" /></figure>



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



<p>With three clients open inside the editor and our dedicated server open, the clients can connect to the session and see each other move without needing a full client open to host the game!</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="539" src="https://couchlearn.com/wp-content/uploads/2025/05/image-41-1024x539.png" alt="Playing with three clients on a dedicated server" class="wp-image-2354" srcset="https://couchlearn.com/wp-content/uploads/2025/05/image-41-1024x539.png 1024w, https://couchlearn.com/wp-content/uploads/2025/05/image-41-300x158.png 300w, https://couchlearn.com/wp-content/uploads/2025/05/image-41-768x404.png 768w, https://couchlearn.com/wp-content/uploads/2025/05/image-41-1536x809.png 1536w, https://couchlearn.com/wp-content/uploads/2025/05/image-41.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Project Files</h2>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://couchlearn.gumroad.com/l/objlo">Loading&#8230;</a></div>



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



<p>You now have a dedicated server of your game building with the ability to be connected to!<br><br>With this knowledge, you&#8217;re one step closer to launching a fully featured multiplayer game that performs well and delivers a consistent experience to players!</p>



<h3 class="wp-block-heading">Further Reading</h3>



<ul class="wp-block-list">
<li><a href="https://docs.unrealengine.com/5.0/en-US/dedicated-servers-in-unreal-engine/">Click here to read the Unreal Engine Dedicated Server Guide</a></li>



<li><a href="https://docs.unrealengine.com/5.0/en-US/unreal-engine-networking-and-multiplayer/">For more networking fundamentals click here for the UE Networking Overview</a></li>



<li><a href="https://docs.unrealengine.com/5.0/en-US/building-and-compiling-unreal-engine-projects/">It&#8217;s always great to read up on how to build projects based on our learning of the project launcher, Click here for the UE documentation on Building Projects</a></li>
</ul>
<p>The post <a href="https://couchlearn.com/how-to-build-a-dedicated-server-for-your-unreal-engine-5-game/">How to build a Dedicated Server for your Unreal Engine 5 Game</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-build-a-dedicated-server-for-your-unreal-engine-5-game/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use Data Tables in your Unreal Engine 5 game</title>
		<link>https://couchlearn.com/how-to-use-data-tables-in-your-unreal-engine-5-game/</link>
					<comments>https://couchlearn.com/how-to-use-data-tables-in-your-unreal-engine-5-game/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Sun, 30 Mar 2025 23:02:36 +0000</pubDate>
				<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 4]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[How to use Data Tables in your Unreal Engine 5 game]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine datatables]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=784</guid>

					<description><![CDATA[<p>Data tables are a useful feature of Unreal Engine 5. They allow the programmer/designer to create and access a pre-made list of information. When creating <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-use-data-tables-in-your-unreal-engine-5-game/" title="How to use Data Tables in your Unreal Engine 5 game">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-use-data-tables-in-your-unreal-engine-5-game/">How to use Data Tables in your Unreal Engine 5 game</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Data tables are a useful feature of Unreal Engine 5. They allow the programmer/designer to create and access a pre-made list of information.<br><br><strong>When creating a data table you are asked to choose which struct you want to base the data table on.</strong><br><br>Here are a few game mechanic uses of data tables:</p>



<ul class="wp-block-list">
<li><em>RPG item data table that contains item stats such as damage, armour etc.</em></li>



<li><em>Subtitles for dialogue that can easily be accessed by character name.</em></li>



<li><em>An enemy data table containing a list of pre made enemy types with enemy health, damage, stamina etc.</em></li>
</ul>



<p>In this guide we will be showing you how to use Data Tables in your Unreal Engine 5 game.</p>



<h2 class="wp-block-heading">Pre-requisites</h2>



<p>To use Data Tables in Unreal Engine 5 you will need to know how to create and use structures.<br><a href="https://couchlearn.com/how-to-use-structs-in-unreal-engine-4/">Click here to read our guide on structures.</a><br><br>It would also help to know how to create and use an blueprint enum.<br><a href="https://couchlearn.com/enums-in-unreal-engine-4-blueprints/">Click here to learn about enums in Unreal Engine and how to create them in your project.</a></p>



<h2 class="wp-block-heading">What is a Data Table?</h2>



<p>In Unreal Engine 5, a Data Table is an extremely useful tool that allows you to define a list of data and store different values for this defined list based on a key.<br><br>This data is stored as an asset in your project which makes it incredibly easy to retrieve and update the data from anywhere in your code.<br><br>The data is also remembered inside of the editor meaning you can create your data while you are developing your project, then use the data inside of your project during runtime. <br><br>A great example of this is data for items or enemies in your project. This data can be set by you when designing your items and enemies which is then saved and persistent.<br><br>Making and using Data Tables in Unreal Engine 5 is easy and requires very little work. In the next section we explain how to make your own data table inside of your Unreal Engine 5 project!</p>



<h2 class="wp-block-heading">Making our Data Table</h2>



<h2 class="wp-block-heading">Creating an Enum</h2>



<p>Before we create our struct, we need to create an enum. This is an item rarity enum which will represent the quality of our role playing game item.<br><br>Simply create your enum by right clicking the content browser and clicking Enumeration in the Blueprint category.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="507" height="529" src="https://couchlearn.com/wp-content/uploads/2025/03/image-25.png" alt="" class="wp-image-2266" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-25.png 507w, https://couchlearn.com/wp-content/uploads/2025/03/image-25-288x300.png 288w" sizes="(max-width: 507px) 100vw, 507px" /></figure>



<p>Then set the values as shown that you require. If you are following along with this guide, copy the values in the image below.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="321" src="https://couchlearn.com/wp-content/uploads/2022/12/image-1-1024x321.png" alt="Creating a basic enumerator for our rarity values" class="wp-image-1902" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-1-1024x321.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-1-300x94.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-1-768x240.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-1.png 1217w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Creating our Struct</h3>



<p>Now that we have our enum created, next we need to create the struct that our data table will use for the types of values it will hold.<br><br>Right click anywhere in the content browser, then click Structure in the Blueprints category.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="615" src="https://couchlearn.com/wp-content/uploads/2022/12/image-1024x615.png" alt="Creating a new structure" class="wp-image-1899" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-1024x615.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-300x180.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-768x461.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image.png 1107w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then set the values as shown that you require. If you are following along with this guide, copy the values in the image below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1012" height="308" src="https://couchlearn.com/wp-content/uploads/2022/12/image-6.png" alt="Adding the damage, rarity and sell price values to our struct" class="wp-image-1907" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-6.png 1012w, https://couchlearn.com/wp-content/uploads/2022/12/image-6-300x91.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-6-768x234.png 768w" sizes="(max-width: 1012px) 100vw, 1012px" /></figure>



<h3 class="wp-block-heading">Creating our Data table</h3>



<p>Finally we can create our data table. This is done exactly the same way by right clicking inside of the content browser and clicking the Data Table option in the Miscellaneous category. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="654" src="https://couchlearn.com/wp-content/uploads/2022/12/image-3-1024x654.png" alt="Creating the datatable" class="wp-image-1904" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-3-1024x654.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-3-300x192.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-3-768x491.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-3.png 1373w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next there is a popup asking which struct you want to use. In this guide we are using the ExampleStruct we made earlier.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="569" height="233" src="https://couchlearn.com/wp-content/uploads/2022/12/image-4.png" alt="Choosing our datatable row structure" class="wp-image-1905" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-4.png 569w, https://couchlearn.com/wp-content/uploads/2022/12/image-4-300x123.png 300w" sizes="(max-width: 569px) 100vw, 569px" /></figure>



<h3 class="wp-block-heading">Adding Values to the Data Table</h3>



<p>Now that are data table is created and configured correctly, we can press the Add button to add a new row to our data table.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="454" src="https://couchlearn.com/wp-content/uploads/2022/12/image-5-1024x454.png" alt="Adding a new row to the datatable" class="wp-image-1906" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-5-1024x454.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-5-300x133.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-5-768x340.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-5.png 1517w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As you can see in the image below, the data table has a new row with some default values from our struct.</p>



<p>We can change the values in the &#8220;Row Editor&#8221; and the values in the data table will change above. <br><br><strong>We can now create as many entries as we want!</strong></p>



<figure class="wp-block-image size-full"><img decoding="async" width="949" height="443" src="https://couchlearn.com/wp-content/uploads/2022/12/image-7.png" alt="Showing the values in our new datatable row" class="wp-image-1909" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-7.png 949w, https://couchlearn.com/wp-content/uploads/2022/12/image-7-300x140.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-7-768x359.png 768w" sizes="(max-width: 949px) 100vw, 949px" /></figure>



<p>Clicking the row name section in the row, we can change the row name. In this example we are using BronzeSword as the new row name.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="620" height="301" src="https://couchlearn.com/wp-content/uploads/2022/12/image-8.png" alt="Changing the values of the datatable row" class="wp-image-1910" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-8.png 620w, https://couchlearn.com/wp-content/uploads/2022/12/image-8-300x146.png 300w" sizes="(max-width: 620px) 100vw, 620px" /></figure>



<p>The Damage, Rarity, and Sell Price values we defined earlier are in the Data Table view, and the Row Editor below.<br><br>Changing the values in the Row Editor will affect the values stored in the data table.<br><br>Don&#8217;t forget to <strong>Save </strong>often to prevent losing your changes!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="632" height="397" src="https://couchlearn.com/wp-content/uploads/2022/12/image-9.png" alt="Setting more datatable row values" class="wp-image-1911" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-9.png 632w, https://couchlearn.com/wp-content/uploads/2022/12/image-9-300x188.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></figure>



<h2 class="wp-block-heading">Using your Data Table</h2>



<p>Now that we have our data table created, configured, and filled with data, we can now learn how to access this data in our code.<br><br>We have create an Event BeginPlay node to our level blueprint and have created a Get Data Table Row node.<br><br>This Get Data Table Row node asks for a data table asset reference, and a row name.<br><br>Data Table reference is our data table we created earlier, and the Row Name is the row we want to try to find the data for.<br><br>If the row is found, the Row Found pin will run code and the Out Row will contain our data, if the row is not found, the Row Not Found pin will run code and the Out Row data will be invalid.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="639" height="263" src="https://couchlearn.com/wp-content/uploads/2025/03/image-18.png" alt="Creating a get data table row node" class="wp-image-2258" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-18.png 639w, https://couchlearn.com/wp-content/uploads/2025/03/image-18-300x123.png 300w" sizes="(max-width: 639px) 100vw, 639px" /></figure>



<p>We can set the Data Table reference by clicking on the select asset drop down and selecting our data table from the list of assets.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="593" height="301" src="https://couchlearn.com/wp-content/uploads/2025/03/image-19.png" alt="Setting the data table reference in the get data table row node" class="wp-image-2259" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-19.png 593w, https://couchlearn.com/wp-content/uploads/2025/03/image-19-300x152.png 300w" sizes="(max-width: 593px) 100vw, 593px" /></figure>



<p>Now we can split the Out Row struct by right clicking and clicking Split Struct Pin in the menu. This will split our struct into all the types and values in contains for easy visibility.<br><br>We can also see that our Row Name is now a drop down that contains all the available row names. This can be overridden by connecting a value to the Row Name pink pin.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="693" height="285" src="https://couchlearn.com/wp-content/uploads/2025/03/image-20.png" alt="Splitting the data table row struct to see the values and types" class="wp-image-2260" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-20.png 693w, https://couchlearn.com/wp-content/uploads/2025/03/image-20-300x123.png 300w" sizes="(max-width: 693px) 100vw, 693px" /></figure>



<p>Now that we have split our Out Row struct, we can see the Damage, Rarity, and Sell Price values we set earlier.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="565" height="243" src="https://couchlearn.com/wp-content/uploads/2025/03/image-21.png" alt="Getting the row data from a specific row name key" class="wp-image-2261" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-21.png 565w, https://couchlearn.com/wp-content/uploads/2025/03/image-21-300x129.png 300w" sizes="(max-width: 565px) 100vw, 565px" /></figure>



<h3 class="wp-block-heading">Looping over your Data Table Rows</h3>



<p>Now that we can access a specific row in our data table, it is essential to know how to use a loop with a data table.<br><br>In the example below we have created a Get Data Table Row Names node. This returns an Array with all of the row names inside of the data table.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="541" height="163" src="https://couchlearn.com/wp-content/uploads/2025/03/image-22.png" alt="Getting the data table row names" class="wp-image-2262" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-22.png 541w, https://couchlearn.com/wp-content/uploads/2025/03/image-22-300x90.png 300w" sizes="(max-width: 541px) 100vw, 541px" /></figure>



<p>We can then connect this to a For Each Loop node. This will now run the Loop Body for each Row Name in the Out Row Names from our Data Table.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="773" height="193" src="https://couchlearn.com/wp-content/uploads/2025/03/image-23.png" alt="Creating a for loop from the gathered data table row names" class="wp-image-2263" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-23.png 773w, https://couchlearn.com/wp-content/uploads/2025/03/image-23-300x75.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-23-768x192.png 768w" sizes="(max-width: 773px) 100vw, 773px" /></figure>



<p>Finally connecting our For Each Loop into a Get Data Table Row like before, we can then connect the Array Element pink pin to the Row Name pink pin. <br><br>This will now get the data for that row name each time the loop runs.<br><br>We can then use the Out Row values however we want in the project!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1025" height="227" src="https://couchlearn.com/wp-content/uploads/2025/03/image-24.png" alt="Getting the datatable row using the looped array element name" class="wp-image-2264" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-24.png 1025w, https://couchlearn.com/wp-content/uploads/2025/03/image-24-300x66.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-24-768x170.png 768w" sizes="(max-width: 1025px) 100vw, 1025px" /></figure>



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



<p>Now you have learned how to create, configure, populate, and implement data tables in your Unreal Engine 5 project!<br><br>Almost every Unreal Engine project benefits from using a data table to efficiently and neatly store data for use within the systems you develop.<br><br>Working collaboratively using data tables makes sharing a single source of truth for your projects data simple and does not require any C++ knowledge!</p>



<h3 class="wp-block-heading">Further Reading:</h3>



<ul class="wp-block-list">
<li><a href="https://dev.epicgames.com/community/learning/tutorials/Gp9j/working-with-data-in-unreal-engine-data-tables-data-assets-uproperty-specifiers-and-more">A more advanced look into Data Table merging and composite tables from Unreal Engine 5&#8217;s wiki</a></li>



<li><a href="https://www.youtube.com/watch?v=aZdztLTG3OQ">A great visual guide for Data Tables by Gorka Games (Not affiliated with CouchLearn)</a></li>



<li><a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/DataTable">The official Unreal Engine 5 documentation for Data Tables in Blueprints</a></li>
</ul>
<p>The post <a href="https://couchlearn.com/how-to-use-data-tables-in-your-unreal-engine-5-game/">How to use Data Tables in your Unreal Engine 5 game</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-use-data-tables-in-your-unreal-engine-5-game/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to use C++ Blueprint Function Library in UE5</title>
		<link>https://couchlearn.com/how-to-use-cpp-blueprint-function-library-in-ue5/</link>
					<comments>https://couchlearn.com/how-to-use-cpp-blueprint-function-library-in-ue5/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Sat, 15 Mar 2025 20:01:02 +0000</pubDate>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[How to use C++ Blueprint Function Library in UE5]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 c++]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 c++]]></category>
		<category><![CDATA[unreal engine c++]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=2207</guid>

					<description><![CDATA[<p>In every game development project there will come a time where your Blueprint code is running too slow and can&#8217;t be optimised any further. Writing <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-use-cpp-blueprint-function-library-in-ue5/" title="How to use C++ Blueprint Function Library in UE5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-use-cpp-blueprint-function-library-in-ue5/">How to use C++ Blueprint Function Library in UE5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In every game development project there will come a time where your Blueprint code is running too slow and can&#8217;t be optimised any further.<br><br>Writing your code entirely in C++ will always run faster but requires a complete restructure of your project to easily work with your existing Blueprint code.<br><br>Also, there are C++ features you may want to use in your project that do not have Blueprint nodes available.<br><br>Using a C++ Function Library, we can gain the functionality, speed, and efficiency of C++ code while integrating effortlessly into your existing blueprint code!<br><br>In this guide we explain how to use C++ Blueprint Function Library in UE5. This contains what a C++ Blueprint Function Library is, how to create one in your project, and how to access your function library in your blueprint editor.</p>



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



<p>This guide expects a basic level of knowledge of C++ in Unreal Engine 5.</p>



<p>To follow this guide you also need to have one of the following:</p>



<ul class="wp-block-list">
<li>Visual Studio for Windows<br>or</li>



<li>XCode for MacOS</li>
</ul>



<p>These programs are used to compile the C++ code into your project. If you do not have a IDE installed, the engine will prompt you to install one.</p>



<h2 class="wp-block-heading">What is a C++ Blueprint Function Library</h2>



<p>The C++ Blueprint Library is a built in Unreal Engine class that allows code to be written using the C++ programming language to be used in both C++ code or in Blueprints!<br><br>This means we can move our slow blueprints nodes into optimised C++ code then run these functions inside of our blueprint code.<br><br>This gives us the power of C++ inside of blueprints in an easily accessible form!</p>



<h2 class="wp-block-heading">How to create a C++ Blueprint Function Library</h2>



<h3 class="wp-block-heading">C++ Project vs Blueprint Project</h3>



<p>Firstly, we need to find out if our project is a C++ enabled project, or only a blueprint enabled project. Luckily this is easy to do!</p>



<p>Click the Tools drop down at the top of the screen, then click <strong><em>&#8220;New C++ Class</em></strong>&#8220;.</p>



<p>If you do not have one of the preqrequisite programs installed as explained earlier, the engine will instruct you what you need to install.<br><br>In our case, for this guide, we used a MacOS machine, and so we installed XCode.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="851" src="https://couchlearn.com/wp-content/uploads/2025/03/image-1024x851.png" alt="Creating a new C++ class in our project" class="wp-image-2214" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-1024x851.png 1024w, https://couchlearn.com/wp-content/uploads/2025/03/image-300x249.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-768x639.png 768w, https://couchlearn.com/wp-content/uploads/2025/03/image.png 1092w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next, the dialog box will appear asking which type of &#8220;Parent Class&#8221; you wish to use when creating your new class.<br><br>As we are making a C++ blueprint function library, we scroll down near the bottom and click &#8220;Blueprint Function Library&#8221;. To move to the next section, we press the blue NEXT button.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="994" height="614" src="https://couchlearn.com/wp-content/uploads/2025/03/image-1.png" alt="Choosing the blueprint function library as our parent class" class="wp-image-2215" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-1.png 994w, https://couchlearn.com/wp-content/uploads/2025/03/image-1-300x185.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-1-768x474.png 768w" sizes="(max-width: 994px) 100vw, 994px" /></figure>



<p>We then are asked to choose a name for our new blueprint function library class.<br><br>In this guide we used the default name &#8220;MyBlueprintFunctionLibrary&#8221;. You can change this to your choice of name.<br><br>We recommend a clear name with capital letters for each word in the name to follow Unreal Engine 5&#8217;s naming convention.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="961" height="595" src="https://couchlearn.com/wp-content/uploads/2025/03/image-2.png" alt="Choosing the name for our new C++ blueprint function library " class="wp-image-2216" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-2.png 961w, https://couchlearn.com/wp-content/uploads/2025/03/image-2-300x186.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-2-768x476.png 768w" sizes="(max-width: 961px) 100vw, 961px" /></figure>



<p>After naming our class and clicking the Create Class button, our project then compiles the new files for us to use. Wait for this to complete before moving on the next section.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="673" height="152" src="https://couchlearn.com/wp-content/uploads/2025/03/image-3.png" alt="Waiting for the code to compile into our unreal engine 5 project" class="wp-image-2217" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-3.png 673w, https://couchlearn.com/wp-content/uploads/2025/03/image-3-300x68.png 300w" sizes="(max-width: 673px) 100vw, 673px" /></figure>



<h3 class="wp-block-heading">Inside your Code IDE</h3>



<p>Now that our new class has been created, we can now open our IDE of choice and look at the files Unreal Engine has created for us.<br><br>As we chose &#8220;MyBlueprintFunctionLibrary&#8221; as our class name, we can see that we have two files. A .cpp file for our code, and a .h header file for our declarations both with our chosen name.</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="254" height="68" src="https://couchlearn.com/wp-content/uploads/2025/03/image-5.png" alt="Seeing the new blueprint function library source header and cpp files in the IDE" class="wp-image-2219" style="width:336px;height:auto"/></figure>



<h3 class="wp-block-heading">Add functions</h3>



<p>Now we are ready to add our C++ code to add functionality to our Blueprint Function Library. <br><br>For this guide we are making a simple read and write system for strings. This will take our string and save it to a specified file, and can also read a file into a Unreal Engine string.<br><br>For your project, you can write the C++ code necessary for your required features.<br><br>First in our header file we can see that the engine has generated us a basic file with the correct includes and inheritance for our class.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="687" height="323" src="https://couchlearn.com/wp-content/uploads/2025/03/image-4.png" alt="Looking at our template header file" class="wp-image-2218" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-4.png 687w, https://couchlearn.com/wp-content/uploads/2025/03/image-4-300x141.png 300w" sizes="(max-width: 687px) 100vw, 687px" /></figure>



<p>Next we add our function declaration. We have added a basic function that returns a true or false bool based on if we can save the string to the file or not.<br><br>The most important part is to use the <em><strong>static</strong></em> keyword. This makes our function accessible anywhere without an object reference!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="753" height="152" src="https://couchlearn.com/wp-content/uploads/2025/03/image-6.png" alt="Adding the function declaration to the header file" class="wp-image-2220" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-6.png 753w, https://couchlearn.com/wp-content/uploads/2025/03/image-6-300x61.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></figure>



<p>We then must add our <em><strong>UFUNCTION</strong></em> macro to make our function visible inside of our blueprint editor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="743" height="156" src="https://couchlearn.com/wp-content/uploads/2025/03/image-7.png" alt="adding the UFUNCTION macro to the function declaration" class="wp-image-2222" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-7.png 743w, https://couchlearn.com/wp-content/uploads/2025/03/image-7-300x63.png 300w" sizes="(max-width: 743px) 100vw, 743px" /></figure>



<p>Next, we repeat the same as before with our loading string from file function. As before it is static with a <em><strong>UFUNCTION</strong></em> macro for blueprint compatibility.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="346" src="https://couchlearn.com/wp-content/uploads/2025/03/image-13-1024x346.png" alt="Adding the load function to our C++ blueprint function library" class="wp-image-2230" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-13-1024x346.png 1024w, https://couchlearn.com/wp-content/uploads/2025/03/image-13-300x101.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-13-768x260.png 768w, https://couchlearn.com/wp-content/uploads/2025/03/image-13-1536x520.png 1536w, https://couchlearn.com/wp-content/uploads/2025/03/image-13.png 1614w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Lastly, we open the .cpp file and add our function code. <br><br>This is a simple use of the FFileHelper library in Unreal Engine 5 to allow us to read and write strings to files.<br><br>Our Blueprint Function Library is now a powerful example of what we can do when we need access to C++ functionality inside of our blueprints!</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="301" src="https://couchlearn.com/wp-content/uploads/2025/03/image-16-1024x301.png" alt="Adding the code into the cpp file for the blueprint function library in C++" class="wp-image-2233" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-16-1024x301.png 1024w, https://couchlearn.com/wp-content/uploads/2025/03/image-16-300x88.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-16-768x226.png 768w, https://couchlearn.com/wp-content/uploads/2025/03/image-16-1536x451.png 1536w, https://couchlearn.com/wp-content/uploads/2025/03/image-16.png 1696w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Once you have completed this step, <strong><em>compile your project</em></strong> and relaunch the editor.</p>



<h2 class="wp-block-heading">How to use the C++ Blueprint Function Library in Blueprints</h2>



<p>Finally, we can open any blueprint editor and type the name of our new blueprint function libary.<br><br>We can see in the actions pop up box that our two &#8220;Load String to File&#8221; and &#8220;Save String to File&#8221; C++ functions are now exposed to the blueprints system!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="898" height="416" src="https://couchlearn.com/wp-content/uploads/2025/03/image-9.png" alt="Seeing the newly created C++ functions available in the blueprint editor" class="wp-image-2225" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-9.png 898w, https://couchlearn.com/wp-content/uploads/2025/03/image-9-300x139.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-9-768x356.png 768w" sizes="(max-width: 898px) 100vw, 898px" /></figure>



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



<p>To demonstrate our functions working, we opened the level blueprint, created a BeginPlay event, and connected our new Save String to File C++ Blueprint Library function to it.<br><br>We can specify any string to save, and choose a file name.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="994" height="370" src="https://couchlearn.com/wp-content/uploads/2025/03/image-10.png" alt="Running our save string to file function library function in blueprints" class="wp-image-2226" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-10.png 994w, https://couchlearn.com/wp-content/uploads/2025/03/image-10-300x112.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-10-768x286.png 768w" sizes="(max-width: 994px) 100vw, 994px" /></figure>



<p>After running this with &#8220;Save Test&#8221; as the String to Save and textfile-test.txt as the File Name, we can see in the project /Saved folder our file and string!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="806" height="170" src="https://couchlearn.com/wp-content/uploads/2025/03/image-11.png" alt="Our function saving the Save Test string to the file" class="wp-image-2227" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-11.png 806w, https://couchlearn.com/wp-content/uploads/2025/03/image-11-300x63.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-11-768x162.png 768w" sizes="(max-width: 806px) 100vw, 806px" /></figure>



<p>Lastly, we can test our Load String from File function inside of the editor the same way.<br><br>We have created the loadtest.txt file in the /Saved folder of our project, and written the string &#8220;Loading Test&#8221; into it and saved.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="770" height="110" src="https://couchlearn.com/wp-content/uploads/2025/03/image-12.png" alt="The string inside of the file we are testing our load function with" class="wp-image-2228" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-12.png 770w, https://couchlearn.com/wp-content/uploads/2025/03/image-12-300x43.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-12-768x110.png 768w" sizes="(max-width: 770px) 100vw, 770px" /></figure>



<p>Inside of the level blueprint we then add our Load String from File C++ Blueprint Function Library function and connected it to a print string node.<br><br>This will load of text file into a string and print it to the screen.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="300" src="https://couchlearn.com/wp-content/uploads/2025/03/image-15-1024x300.png" alt="Running the load string from file function inside of the begin play event and printing the string to the screen" class="wp-image-2232" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-15-1024x300.png 1024w, https://couchlearn.com/wp-content/uploads/2025/03/image-15-300x88.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-15-768x225.png 768w, https://couchlearn.com/wp-content/uploads/2025/03/image-15.png 1388w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As you can see, after playing our project in the editor, our string from inside our file is show on screen!</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="618" src="https://couchlearn.com/wp-content/uploads/2025/03/image-17-1024x618.png" alt="The Loading Test string being loaded from file and printed onto the screen" class="wp-image-2234" srcset="https://couchlearn.com/wp-content/uploads/2025/03/image-17-1024x618.png 1024w, https://couchlearn.com/wp-content/uploads/2025/03/image-17-300x181.png 300w, https://couchlearn.com/wp-content/uploads/2025/03/image-17-768x464.png 768w, https://couchlearn.com/wp-content/uploads/2025/03/image-17-1536x927.png 1536w, https://couchlearn.com/wp-content/uploads/2025/03/image-17.png 1632w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



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



<p>Now you understand how to use C++ Blueprint Function Libraries in Unreal Engine 5!<br><br>The use of these function libraries gives tangible performance improvements and also unlocks the hidden functionality inside of the engine; exposing this to your blueprint code!</p>



<h3 class="wp-block-heading">Further Reading</h3>



<p><a href="https://dev.epicgames.com/documentation/en-us/unreal-engine/blueprint-function-libraries-in-unreal-engine">Official blueprint function library documentation from Epic Games</a><br><a href="https://couchlearn.com/category/unreal-engine/c/">Click here to read more of our C++ guides for Unreal Engine</a></p>



<p></p>
<p>The post <a href="https://couchlearn.com/how-to-use-cpp-blueprint-function-library-in-ue5/">How to use C++ Blueprint Function Library in UE5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-use-cpp-blueprint-function-library-in-ue5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting started with Blueprint Functions in Unreal Engine 5</title>
		<link>https://couchlearn.com/getting-started-with-blueprint-functions-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/getting-started-with-blueprint-functions-in-unreal-engine-5/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Sat, 25 Jan 2025 17:13:36 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[UE4 Basics]]></category>
		<category><![CDATA[Unreal Basics]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[easy difficulty]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 basics]]></category>
		<category><![CDATA[unreal basics]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 4]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1793</guid>

					<description><![CDATA[<p>One fundamental is the concept in programming is the function. Functions are self contained code that can be run from anywhere. Unreal Engine 5 blueprints <a class="mh-excerpt-more" href="https://couchlearn.com/getting-started-with-blueprint-functions-in-unreal-engine-5/" title="Getting started with Blueprint Functions in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/getting-started-with-blueprint-functions-in-unreal-engine-5/">Getting started with Blueprint Functions in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>One fundamental is the concept in programming is the function. Functions are self contained code that can be run from anywhere.<br><br>Unreal Engine 5 blueprints also have functions that you can use to separate your nodes inside the blueprint editor.<br><br>In this guide we will be showing you how to get started with Blueprint Functions in Unreal Engine 5!</p>



<h2 class="wp-block-heading">What is a Function?</h2>



<p>Blueprint Functions are self-contained pieces of logic that you can create once and run from multiple places in your Blueprints. They allow input and output parameters for flexibility.</p>



<p>For example, instead of writing the same logic to calculate damage multiple times, you can create a function called <strong><em>CalculateDamage</em></strong>, call it wherever needed, and update it in one place if changes are required.<br><br>Note that a function is created for a specific blueprint actor and can only be used<br><br>In this guide we are going to start right from the beginning and create a simple function to help you understand this concept. We then expand upon this and show you more features that functions can have!</p>



<h2 class="wp-block-heading">Creating a Function</h2>



<p>To start, we are going to make a simple function that prints a string to the screen.<br><br>Firstly we need to open the blueprint actor that we want to add the function to. In this example we are using the FirstPersonCharacter blueprint from the First Person Shooter template provided by Unreal Engine.<br><br>As you can see in the image below, on the left side of the editor window, there is a drop down section named &#8220;Functions&#8221;. This section is where all of our functions live for this specific blueprint.<br><br>We can create a new function by clicking the circle with a plus symbol on the right side of the functions drop down as shown in the image below.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="854" height="1024" src="https://couchlearn.com/wp-content/uploads/2022/11/image-9-854x1024.png" alt="Creating a function using the Unreal blueprint editor" class="wp-image-1825" style="width:738px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-9-854x1024.png 854w, https://couchlearn.com/wp-content/uploads/2022/11/image-9-250x300.png 250w, https://couchlearn.com/wp-content/uploads/2022/11/image-9-768x921.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-9.png 866w" sizes="(max-width: 854px) 100vw, 854px" /></figure>



<p>Next, we can then give our function a name. It is advised to give our functions readable and clear names to keep our project clean. </p>



<p>Messy names that are confusing make developing a large project difficult so it is best to keep this in mind.<br><br>Once the function is named either press enter, or click anywhere in the blueprint window, then click the &#8220;Compile&#8221; button as indicated in the image. This then creates our function and compiles it into the blueprint so we can start using it in our project. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="544" height="716" src="https://couchlearn.com/wp-content/uploads/2022/11/image-10.png" alt="Naming the function then clicking the compile issue" class="wp-image-1826" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-10.png 544w, https://couchlearn.com/wp-content/uploads/2022/11/image-10-228x300.png 228w" sizes="(max-width: 544px) 100vw, 544px" /></figure>



<h3 class="wp-block-heading">Adding Basic Functionality</h3>



<p>Now that we have our new function created and compiled, we can see it doesn&#8217;t do anything at the moment. We need to add some simple functionality!<br><br>In this first example we are printing a string to the screen. To achieve this we need to add that node to our function.<br><br>First, click and drag from the white sidewards triangle on our &#8220;My Custom Function&#8221; node. This is called an <strong>exec pin</strong> and allows us to add pieces of code together to run one after another (sequentially).<br><br>Once we click and drag then let go of the click, anywhere on the grey background grid, we then are greeted with a popup menu showing all of the blueprint nodes (these are functions!) we can add to our own function.<br><br>Click &#8220;Print String&#8221; in the menu, this creates the &#8220;Print String&#8221; node in our function graph. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="585" height="329" src="https://couchlearn.com/wp-content/uploads/2022/11/image-11.png" alt="Adding the print string node to the new custom function" class="wp-image-1827" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-11.png 585w, https://couchlearn.com/wp-content/uploads/2022/11/image-11-300x169.png 300w" sizes="(max-width: 585px) 100vw, 585px" /></figure>



<p>As we dragged from the white exec pin, our Print String node is automatically connected to our MyCustomFunction as shown in the image below.</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="926" height="422" src="https://couchlearn.com/wp-content/uploads/2025/01/image-1.png" alt="The created print string node attached to our MyCustomFunction" class="wp-image-2132" style="width:465px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-1.png 926w, https://couchlearn.com/wp-content/uploads/2025/01/image-1-300x137.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-1-768x350.png 768w" sizes="(max-width: 926px) 100vw, 926px" /></figure>



<p>When our &#8220;My Custom Function&#8221; runs, it will now run the Print String node that is connected to it!<br><br>You may also see people talking about &#8220;call&#8221;, &#8220;called&#8221;, or &#8220;calling&#8221; functions. This is the same as running a function!</p>



<h3 class="wp-block-heading">Testing our Print String</h3>



<p>Now that our function is setup to print a string to the output log we need to run our function. The easiest way is to run our function on Begin Play!<br><br>Begin play is an &#8220;Event&#8221;. An event is similar to a function but cannot return values and can run a few special asynchronous nodes that functions cannot.<br><br>Begin Play is an event that is called when the actor is spawned into the game world. As our FirstPersonCharacter already is in the game world, this Begin Play event runs code when the game starts.<br><br>We first want to click the Event Graph button at the top of the blueprint editor.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="617" src="https://couchlearn.com/wp-content/uploads/2025/01/image-3-1024x617.png" alt="Clicking back onto the Event Graph" class="wp-image-2134" style="width:610px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-3-1024x617.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-3-300x181.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-3-768x463.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-3-1536x926.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-3.png 1768w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now our main blueprint event graph will appear again on the screen.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="649" src="https://couchlearn.com/wp-content/uploads/2025/01/image-5-1024x649.png" alt="Back in the event graph in the blueprint editor" class="wp-image-2136" style="width:625px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-5-1024x649.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-5-300x190.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-5-768x486.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-5-1536x973.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-5-2048x1297.png 2048w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Find somewhere free and right click. In the box that appears search for Event Begin Play and click it to create the event.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="567" src="https://couchlearn.com/wp-content/uploads/2025/01/image-7-1024x567.png" alt="Creating a new BeginPlay event in the event graph" class="wp-image-2138" style="width:598px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-7-1024x567.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-7-300x166.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-7-768x425.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-7-1536x851.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-7.png 1910w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Unreal Engine will automatically run the Begin Play event as described in the previous section so no setup is required. <br><br>Like before, drag from the white exec pin and let go of the mouse click in the grid. In the pop up menu, search for our MyCustomFunction and click it in the list.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="492" src="https://couchlearn.com/wp-content/uploads/2025/01/image-9-1024x492.png" alt="Creating our MyCustomFunction as a node connected to the BeginPlay event" class="wp-image-2141" style="width:606px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-9-1024x492.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-9-300x144.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-9-768x369.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-9-1536x738.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-9.png 1950w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now our MyCustomFunction is connected to our BeginPlay event. The last step is to press the Compile button and save our blueprint.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://couchlearn.com/wp-content/uploads/2025/01/image-14-1024x576.png" alt="Making sure to compile and save our changes" class="wp-image-2146" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-14-1024x576.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-14-300x169.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-14-768x432.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-14-1536x864.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-14-678x381.png 678w, https://couchlearn.com/wp-content/uploads/2025/01/image-14.png 1728w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Clicking play now in our FirstPersonMap will print &#8220;hello&#8221; in our output log.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="241" src="https://couchlearn.com/wp-content/uploads/2025/01/image-16-1024x241.png" alt="Demonstrating MyCustomFunction printing Hello to the output log." class="wp-image-2149" style="width:739px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-16-1024x241.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-16-300x71.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-16-768x181.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-16-1536x362.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-16.png 2014w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Adding more functionality</h3>



<p>Now we have text printing on the screen! That&#8217;s great for testing but not very useful for gameplay. Lets add some more functionality to our blueprint function.<br><br>In this next example we are going to make the <strong>CalculateDamage</strong> function we talked about earlier!<br><br>This function will take in a number called &#8220;<strong>damage</strong>&#8220;, seeing how much &#8220;<strong>armor</strong>&#8221; our character has, then finally subtract the amount of &#8220;<strong>armor</strong>&#8221; from our &#8220;<strong>damage</strong>&#8221; number. In short we are calculating how much damage is dealt after our &#8220;<strong>armor</strong>&#8221; has absorbed some of the damage.</p>



<h4 class="wp-block-heading">Notes on advanced functionality</h4>



<p class="has-text-align-left">Delay nodes are not supported in functions. If your blueprint needs delay nodes, consider using Custom Events. <a href="https://couchlearn.com/how-to-use-custom-events-in-unreal-engine-4">Click here to read our guide on How to use Custom Events in Unreal Engine</a>.</p>



<h4 class="wp-block-heading">Making the CalculateDamage function</h4>



<p>To achieve this goal of our CalculateDamage function, first we need to input data into our function.<br><br>Firstly, click the purple &#8220;My Custom Event&#8221; node. You should now see in the details window on the right side of the editor sections for Input and Output.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="599" src="https://couchlearn.com/wp-content/uploads/2025/01/image-17-1024x599.png" alt="Showing the input and output sections of the function editor" class="wp-image-2157" style="width:759px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-17-1024x599.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-17-300x175.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-17-768x449.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-17-1536x898.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-17.png 1960w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As we are focussing on Input, click the small add button to add a new Input Variable.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="422" src="https://couchlearn.com/wp-content/uploads/2025/01/image-18-1024x422.png" alt="Adding a new input parameter to our function" class="wp-image-2158" style="width:760px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-18-1024x422.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-18-300x124.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-18-768x316.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-18-1536x633.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-18.png 1736w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>We now see a new input parameter for our function.</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="720" height="120" src="https://couchlearn.com/wp-content/uploads/2025/01/image-19.png" alt="The newly created parameter" class="wp-image-2160" style="width:540px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-19.png 720w, https://couchlearn.com/wp-content/uploads/2025/01/image-19-300x50.png 300w" sizes="(max-width: 720px) 100vw, 720px" /></figure>



<p>In this example we want to pass in a number so we change the &#8220;Boolean&#8221; to &#8220;Float&#8221;.</p>



<figure class="wp-block-image size-large is-resized"><img decoding="async" width="1024" height="677" src="https://couchlearn.com/wp-content/uploads/2025/01/image-20-1024x677.png" alt="Changing the parameter's type to Float" class="wp-image-2161" style="width:693px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-20-1024x677.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-20-300x198.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-20-768x508.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-20-1536x1015.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-20.png 1808w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next in the left text box give our new property a name. We are naming this &#8220;Damage&#8221;.<br><br>So far the function should look like this.</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" width="900" height="358" src="https://couchlearn.com/wp-content/uploads/2025/01/image-21.png" alt="The function now has the Damage input parameter" class="wp-image-2163" style="width:518px;height:auto" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-21.png 900w, https://couchlearn.com/wp-content/uploads/2025/01/image-21-300x119.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-21-768x305.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></figure>



<p>Now we are adding some other nodes to calculate our damage value.<br><br>To do this first, drag from the green Damage pin into the grid and let go of the mouse click. In the popup search &#8220;-&#8221; or &#8220;subtract&#8221; to find the subtract node.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="509" src="https://couchlearn.com/wp-content/uploads/2025/01/image-23-1024x509.png" alt="Adding a subtract float node and connecting it to our Damage parameter" class="wp-image-2166" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-23-1024x509.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-23-300x149.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-23-768x381.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-23.png 1510w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next we click and drag from the bottom subtract node pin and let go, in the menu we then click &#8220;Promote to variable&#8221;. This will create a new variable that we name &#8220;Armor&#8221; to store our character&#8217;s armour number.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="640" src="https://couchlearn.com/wp-content/uploads/2025/01/image-24-1024x640.png" alt="Promoting a new Armor variable connected to the subtraction node" class="wp-image-2167" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-24-1024x640.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-24-300x188.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-24-768x480.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-24.png 1472w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next, click the new armor variable in the graph and on the right side details panel and set the armor value to any number you want. In this example we set armor to 15.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="502" src="https://couchlearn.com/wp-content/uploads/2025/01/image-26-1024x502.png" alt="Setting the value of the Armor variable to 15.0" class="wp-image-2169" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-26-1024x502.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-26-300x147.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-26-768x377.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-26-1536x753.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-26.png 1750w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Our MyCustomFunction now takes in the Damage value and subtracts Armor from itself, this is then printed into the output log.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="379" src="https://couchlearn.com/wp-content/uploads/2025/01/image-25-1024x379.png" alt="Our finished input parameter" class="wp-image-2168" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-25-1024x379.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-25-300x111.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-25-768x285.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-25.png 1112w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Returning our value</h3>



<p>Our function now calculates values but does not send those values anywhere! We need to &#8220;<strong>return&#8221;</strong> this value out of our new function.<br><br>Returning a value is the word used to describe the output of our function. In Unreal Engine Blueprints we can have as many input and output values as we like.<br><br>First click our MyCustomFunction and look to the details panel on the right side of the editor again.<br><br>This time we are clicking the plus button on the Output section.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="355" src="https://couchlearn.com/wp-content/uploads/2025/01/image-28-1024x355.png" alt="Adding a new output parameter to the function" class="wp-image-2174" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-28-1024x355.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-28-300x104.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-28-768x267.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-28-1536x533.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-28.png 1896w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In the newly created Output result, change the type to Float and set the name to Result. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="734" height="124" src="https://couchlearn.com/wp-content/uploads/2025/01/image-29.png" alt="Setting the name of the output parameter to Result and setting the type to float" class="wp-image-2175" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-29.png 734w, https://couchlearn.com/wp-content/uploads/2025/01/image-29-300x51.png 300w" sizes="(max-width: 734px) 100vw, 734px" /></figure>



<p>After creating the new output parameter a &#8220;Return Node&#8221; will be created automatically in the graph.<br><br>This Return Node result pin is where we can &#8220;return&#8221; our values out of the function.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="363" src="https://couchlearn.com/wp-content/uploads/2025/01/image-30-1024x363.png" alt="The engine creates a return node when an output parameter is created" class="wp-image-2176" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-30-1024x363.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-30-300x106.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-30-768x272.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-30-1536x545.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-30.png 1866w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>We then delete the print string from the function as we no longer need it inside the function.<br><br>Our final function now looks like this.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="300" src="https://couchlearn.com/wp-content/uploads/2025/01/image-31-1024x300.png" alt="The finished function doing a basic subtraction" class="wp-image-2178" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-31-1024x300.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-31-300x88.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-31-768x225.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-31.png 1106w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In the event graph our function now looks like this. We can give it a &#8220;damage&#8221; value and get a &#8220;result&#8221; value out from the function!</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="423" src="https://couchlearn.com/wp-content/uploads/2025/01/image-32-1024x423.png" alt="The final function with and input and return value in the event graph" class="wp-image-2179" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-32-1024x423.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-32-300x124.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-32-768x318.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-32.png 1040w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>To test this is working we set damage to 20.0 and connect our returned result value to a print string node.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="354" src="https://couchlearn.com/wp-content/uploads/2025/01/image-33-1024x354.png" alt="Setting the damage value to 20.0" class="wp-image-2181" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-33-1024x354.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-33-300x104.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-33-768x266.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-33.png 1358w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



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



<p>Finally, with our damage set to 20 and our armor set to 15, when we call our MyCustomFunction we get the value 5!<br><br><strong><em>20 &#8211; 15 = 5</em></strong><br><br>In the output you can see that our returned value of 5 is printed to the log!</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="187" src="https://couchlearn.com/wp-content/uploads/2025/01/image-35-1024x187.png" alt="Our final function calculating 20 - 15 and returning 5" class="wp-image-2189" srcset="https://couchlearn.com/wp-content/uploads/2025/01/image-35-1024x187.png 1024w, https://couchlearn.com/wp-content/uploads/2025/01/image-35-300x55.png 300w, https://couchlearn.com/wp-content/uploads/2025/01/image-35-768x140.png 768w, https://couchlearn.com/wp-content/uploads/2025/01/image-35-1536x280.png 1536w, https://couchlearn.com/wp-content/uploads/2025/01/image-35.png 2006w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



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



<p>You’ve now taken the first steps in getting started with Blueprint Functions in Unreal Engine 5! These essential aspects of programming allow you to separate logic into reusable nodes, cleaning up your blueprint actors and making your dream game easier to manage.</p>



<p>The basic concept and example covered in this guide provides a foundation to build upon. Whether you&#8217;re building gameplay mechanics, working on core technology, or cleaning up your existing code, Blueprint Functions are a fundamental aspect of Unreal Engine development.</p>



<p><strong>Further Reading:</strong></p>



<ul class="wp-block-list">
<li><a href="https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Functions/" target="_blank" rel="noreferrer noopener">Click here to read the official blueprint function unreal engine documentation</a></li>



<li><a href="https://www.youtube.com/watch?v=GDnU_6tTPKc" target="_blank" rel="noreferrer noopener">Click here to watch Mathew Wadstein&#8217;s in depth blueprint function guide on YouTube</a> (Not affiliated or associated with CouchLearn)</li>
</ul>
<p>The post <a href="https://couchlearn.com/getting-started-with-blueprint-functions-in-unreal-engine-5/">Getting started with Blueprint Functions in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/getting-started-with-blueprint-functions-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>AI Following the Player in Unreal Engine 5</title>
		<link>https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 19 Jan 2023 20:47:42 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[AI Following the Player in Unreal Engine 5]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[easy difficulty]]></category>
		<category><![CDATA[ue ai follow player]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 ai]]></category>
		<category><![CDATA[ue5 ai follow player]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 AI]]></category>
		<category><![CDATA[unreal engine AI]]></category>
		<category><![CDATA[unreal engine AI follow player]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=2068</guid>

					<description><![CDATA[<p>One common feature of many modern games is AI characters or enemies chasing or following the player. Luckily adding this functionality is incredibly easy and <a class="mh-excerpt-more" href="https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/" title="AI Following the Player in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/">AI Following the Player in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>One common feature of many modern games is AI characters or enemies chasing or following the player. Luckily adding this functionality is incredibly easy and only takes a few blueprint nodes.<br><br>In this guide we are adding the ability for AI Following the Player in Unreal Engine 5.</p>



<h2 class="wp-block-heading">Before we Start</h2>



<p>This guide continues on from the CouchLearn guide <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" target="_blank" rel="noreferrer noopener">&#8220;Setting up a NavMesh in Unreal Engine 5&#8221;</a>.<br><br>Our previous guide explains how to set up a <strong>basic NavMesh</strong> and <strong>AI character</strong> in your Unreal Engine 5 project. Follow the previous guide found <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" target="_blank" rel="noreferrer noopener">here</a> or <a href="https://couchlearn.gumroad.com/l/iywam?wanted=true" target="_blank" rel="noreferrer noopener">download the project files here</a>.</p>



<h2 class="wp-block-heading">Chasing the Player</h2>



<p>In the previous <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" target="_blank" rel="noreferrer noopener">&#8220;Setting up a NavMesh in Unreal Engine 5&#8221;</a>. guide, we finished off with these blueprint nodes to move the AI character around the level.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="789" height="456" src="https://couchlearn.com/wp-content/uploads/2023/01/image-13.png" alt="All blueprint nodes from the previous step." class="wp-image-2076" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-13.png 789w, https://couchlearn.com/wp-content/uploads/2023/01/image-13-300x173.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-13-768x444.png 768w" sizes="(max-width: 789px) 100vw, 789px" /></figure>



<p>Firstly, delete the &#8220;Get Actor Location&#8221; and &#8220;GetRandomReachablePointInRadius&#8221; nodes from the graph.<br><br>These nodes are currently trying to find a random position around the AI. We want the AI to use the player&#8217;s location so it is safe to delete these two nodes.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="746" height="450" src="https://couchlearn.com/wp-content/uploads/2023/01/image-18.png" alt="Deleting the GetActorLocation and GetRandomReachablePointInRadius nodes" class="wp-image-2084" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-18.png 746w, https://couchlearn.com/wp-content/uploads/2023/01/image-18-300x181.png 300w" sizes="(max-width: 746px) 100vw, 746px" /></figure>



<p>Next, add a new &#8220;Get Player Character&#8221; node to the blueprint graph.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="845" height="441" src="https://couchlearn.com/wp-content/uploads/2023/01/image-19.png" alt="Adding the Get Player Character node" class="wp-image-2085" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-19.png 845w, https://couchlearn.com/wp-content/uploads/2023/01/image-19-300x157.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-19-768x401.png 768w" sizes="(max-width: 845px) 100vw, 845px" /></figure>



<p>Then, connect the blue &#8220;Return Value&#8221; pin to the blue &#8220;Target Actor&#8221; pin on the &#8220;AI MoveTo&#8221; node.<br><br>This will now get our &#8220;Target Actor&#8217;s&#8221; location for the AI movement.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="807" height="433" src="https://couchlearn.com/wp-content/uploads/2023/01/image-20.png" alt="Connecting the Get Player Character node to the Target Actor pin of the AI MoveTo node" class="wp-image-2086" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-20.png 807w, https://couchlearn.com/wp-content/uploads/2023/01/image-20-300x161.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-20-768x412.png 768w" sizes="(max-width: 807px) 100vw, 807px" /></figure>



<p>As our AI might fail to move, if the player isn&#8217;t reachable in the navmesh, we now connect the &#8220;On Fail&#8221; pin to the &#8220;Delay&#8221; node.<br><br>This now retries the movement if the player is unreachable or the AI fails the nav mesh movement for any reason. This step will keep the AI following the player no matter the situation.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="834" height="429" src="https://couchlearn.com/wp-content/uploads/2023/01/image-23.png" alt="Connecting the On Fail pin to the Delay node" class="wp-image-2089" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-23.png 834w, https://couchlearn.com/wp-content/uploads/2023/01/image-23-300x154.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-23-768x395.png 768w" sizes="(max-width: 834px) 100vw, 834px" /></figure>



<p>Lastly, make sure to Compile and Save the blueprint editor. This will ensure the changes are applied when we play in the editor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="284" height="148" src="https://couchlearn.com/wp-content/uploads/2023/01/image-17.png" alt="Compile and save the blueprint and actor" class="wp-image-2082"/></figure>



<h3 class="wp-block-heading">Use Cases</h3>



<p>Even thought these steps are easy and only a few blueprint nodes are used, this basic system can enable many types of AI in modern games.<br><br>A few examples of this could be:</p>



<ul class="wp-block-list">
<li>Companion AI following the player around an open world like Skyrim (Using the <a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Unreal Engine dynamic open world navigation</a>).</li>



<li>Zombie AI chasing the player (Using the <a href="https://couchlearn.com/multiplayer-damage-and-health-system-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Unreal Engine damage system</a>).</li>
</ul>



<h3 class="wp-block-heading">Demo Video</h3>



<figure class="wp-block-image size-full"><img decoding="async" width="800" height="449" src="https://couchlearn.com/wp-content/uploads/2023/01/AIFollowingPlayer.webp" alt="The AI following the player character around the Unreal Engine level." class="wp-image-2092"/></figure>



<h2 class="wp-block-heading">Download the Project Files</h2>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://gumroad.com/l/fmkwr">Loading&#8230;</a></div>



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



<p>Now your AI character / enemy is following and chasing the player character around the level in Unreal Engine 5!<br><br>As explained in the previous step, this basic system can be expanded to implement many modern game AI behaviours into your Unreal Engine project. To learn more about the capabilities of AI and Navigation in Unreal Engine, consider reading further using the links below.<br><br>Further Reading:<br><a href="https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">How to smoothly rotate AI characters in Unreal Engine</a><br><a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Open world navigation in Unreal Engine</a><br><a href="https://couchlearn.com/easy-dynamic-pathfinding-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Dynamically generated navigation in Unreal Engine</a><br><a href="https://docs.unrealengine.com/5.0/en-US/navigation-system-in-unreal-engine/" target="_blank" rel="noreferrer noopener">Official Unreal Engine Navigation documentation<br></a></p>
<p>The post <a href="https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/">AI Following the Player in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/ai-following-the-player-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Setting up a NavMesh in Unreal Engine 5</title>
		<link>https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Tue, 10 Jan 2023 21:58:32 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[Setting up a NavMesh in Unreal Engine 5]]></category>
		<category><![CDATA[ue navmesh]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 navmesh]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 navmesh]]></category>
		<category><![CDATA[unreal engine navmesh]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=2024</guid>

					<description><![CDATA[<p>Many modern games have AI controlled characters to add to the atmosphere of a scene or to provide gameplay to the player. To achieve this <a class="mh-excerpt-more" href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/" title="Setting up a NavMesh in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/">Setting up a NavMesh in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Many modern games have AI controlled characters to add to the atmosphere of a scene or to provide gameplay to the player. <br><br>To achieve this in Unreal Engine 5 we need to have a generate a mesh for the characters to navigate through and also create a character that has AI navigation correctly setup. These are easy steps but issues can occur if not setup correctly!<br><br>In this guide we are showing you how to set up a NavMesh and basic AI Character in Unreal Engine 5.</p>



<h2 class="wp-block-heading">Setting up the NavMesh</h2>



<p>Firstly, click Window, then Place Actors. This will show the Place Actors window in the editor. This window allows you to spawn basic objects and volumes into your Unreal Engine 5 level.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="702" height="718" src="https://couchlearn.com/wp-content/uploads/2023/01/image.png" alt="Opening the place actors editor window." class="wp-image-2033" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image.png 702w, https://couchlearn.com/wp-content/uploads/2023/01/image-293x300.png 293w" sizes="(max-width: 702px) 100vw, 702px" /></figure>



<p>Then, add a NavMeshBoundsVolume actor to your level. This can be found in the Modes panel under the &#8220;Volumes&#8221; category.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="820" height="472" src="https://couchlearn.com/wp-content/uploads/2023/01/image-1.png" alt="Adding the nav mesh bounds volume to the level." class="wp-image-2034" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-1.png 820w, https://couchlearn.com/wp-content/uploads/2023/01/image-1-300x173.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-1-768x442.png 768w" sizes="(max-width: 820px) 100vw, 820px" /></figure>



<p>Scale and position the NavMeshBoundsVolume to fit around the area that you want the AI to be able to navigate. <br><br>This can be as large or as small as you require. Bigger nav meshes take longer to generate unless you use dynamic generation. <a href="https://couchlearn.com/easy-dynamic-pathfinding-in-unreal-engine-4/">Click here to read about dynamic nav mesh generation.</a></p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="651" src="https://couchlearn.com/wp-content/uploads/2023/01/image-3-1024x651.png" alt="Scaling and positioning the nav mesh bounds volume around the level geometry." class="wp-image-2039" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-3-1024x651.png 1024w, https://couchlearn.com/wp-content/uploads/2023/01/image-3-300x191.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-3-768x488.png 768w, https://couchlearn.com/wp-content/uploads/2023/01/image-3.png 1404w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now to confirm your Nav Mesh is setup correctly for your level, Press the &#8220;P&#8221; key on your keyboard to see the mesh visualized in the level.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="942" height="546" src="https://couchlearn.com/wp-content/uploads/2023/01/image-4.png" alt="Enabling the debug navigation view to ensure the nav mesh is set up correctly." class="wp-image-2041" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-4.png 942w, https://couchlearn.com/wp-content/uploads/2023/01/image-4-300x174.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-4-768x445.png 768w" sizes="(max-width: 942px) 100vw, 942px" /></figure>



<h2 class="wp-block-heading">Moving the AI Character</h2>



<p>For this guide we are using the third person template that Unreal Engine 5 provides.<br><br>This means we can have an animated character to test the AI Navigation.</p>



<p>To enable our third person character blueprint to navigate the level, first drag your character into the level.<br><em>This can be found in the &#8220;Third Person / Blueprints&#8221; folder in the Content Drawer if you created your project using the Third Person Template.</em></p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="432" src="https://couchlearn.com/wp-content/uploads/2023/01/image-5-1024x432.png" alt="Adding the AI character to the level." class="wp-image-2042" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-5-1024x432.png 1024w, https://couchlearn.com/wp-content/uploads/2023/01/image-5-300x126.png 300w, https://couchlearn.com/wp-content/uploads/2023/01/image-5-768x324.png 768w, https://couchlearn.com/wp-content/uploads/2023/01/image-5.png 1217w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>In the blueprint editor of the character, create a &#8220;Begin Play&#8221; event and connect the &#8220;AI MoveTo&#8221; node as shown in the image below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="605" height="307" src="https://couchlearn.com/wp-content/uploads/2023/01/image-6.png" alt="Adding the AI MoveTo node to the blueprint graph." class="wp-image-2043" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-6.png 605w, https://couchlearn.com/wp-content/uploads/2023/01/image-6-300x152.png 300w" sizes="(max-width: 605px) 100vw, 605px" /></figure>



<p>Next, create a &#8220;GetRandomReachablePointInRadius&#8221; node and connect the output yellow vector pin to the yellow &#8220;Destination&#8221; pin on the &#8220;AI MoveTo&#8221; Node.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="742" height="326" src="https://couchlearn.com/wp-content/uploads/2023/01/image-7.png" alt="Connecting the GetRandomReachablePointInRadius node to the Ai MoveTo node." class="wp-image-2044" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-7.png 742w, https://couchlearn.com/wp-content/uploads/2023/01/image-7-300x132.png 300w" sizes="(max-width: 742px) 100vw, 742px" /></figure>



<p>Then create and connect a &#8220;Get Actor Location&#8221; node to the &#8220;Origin&#8221; yellow vector pin. This Origin position is where the random movement is calculated around.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="735" height="436" src="https://couchlearn.com/wp-content/uploads/2023/01/image-9.png" alt="Connecting the Get Actor Location ndoe to the GetRandomReachablePointInRadius node. This gives us the origin for navigation checks." class="wp-image-2046" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-9.png 735w, https://couchlearn.com/wp-content/uploads/2023/01/image-9-300x178.png 300w" sizes="(max-width: 735px) 100vw, 735px" /></figure>



<p>Set the green &#8220;Radius&#8221; pin value to the distance you want your AI to roam around. In this guide we are using &#8220;2000&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="742" height="399" src="https://couchlearn.com/wp-content/uploads/2023/01/image-10.png" alt="Setting the navigation radius to 2000." class="wp-image-2047" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-10.png 742w, https://couchlearn.com/wp-content/uploads/2023/01/image-10-300x161.png 300w" sizes="(max-width: 742px) 100vw, 742px" /></figure>



<p>Create a &#8220;Reference to Self&#8221; node and connect this to the blue &#8220;Pawn&#8221; pin of the &#8220;AI MoveTo&#8221; node.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="768" height="405" src="https://couchlearn.com/wp-content/uploads/2023/01/image-11.png" alt="Setting the AI Pawn to the self character reference." class="wp-image-2048" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-11.png 768w, https://couchlearn.com/wp-content/uploads/2023/01/image-11-300x158.png 300w" sizes="(max-width: 768px) 100vw, 768px" /></figure>



<p>Finally, create a &#8220;Delay&#8221; node then connect it to the &#8220;On Success&#8221; pin. Connect the end of the Delay back into the AI MoveTo node. This will continuously navigate the AI character around the Navigation Mesh.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="766" height="457" src="https://couchlearn.com/wp-content/uploads/2023/01/image-12.png" alt="Adding and connecting the Delay node to the On Success pin and the AI MoveTo Node." class="wp-image-2049" srcset="https://couchlearn.com/wp-content/uploads/2023/01/image-12.png 766w, https://couchlearn.com/wp-content/uploads/2023/01/image-12-300x179.png 300w" sizes="(max-width: 766px) 100vw, 766px" /></figure>



<p><strong>Now you can click &#8220;Play&#8221; and the character will then begin moving towards random locations in your level using the NavMesh.</strong></p>



<h2 class="wp-block-heading">Demo Video</h2>



<figure class="wp-block-image size-full"><img decoding="async" width="800" height="450" src="https://couchlearn.com/wp-content/uploads/2023/01/BasicNavMeshExample.webp" alt="Example video showing the AI moving around the level using the NavMesh in the Unreal Engine 5 editor." class="wp-image-2053"/></figure>



<h2 class="wp-block-heading">Download the Project Files</h2>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://gumroad.com/l/iywam">Loading&#8230;</a></div>



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



<p>Now your character is moving around the level all by itself! This AI behaviour is very basic but can be expanded upon greatly using many of the great AI features in Unreal Engine 5. To learn more about AI and Navigation in Unreal Engine consider reading further using the links below.<br><br>Further Reading:<br><a href="https://couchlearn.com/how-to-smoothly-rotate-ai-characters-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">How to smoothly rotate AI characters in Unreal Engine</a><br><a href="https://couchlearn.com/open-world-navigation-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Open world navigation in Unreal Engine</a><br><a href="https://couchlearn.com/easy-dynamic-pathfinding-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Dynamically generated navigation in Unreal Engine</a><br><a href="https://docs.unrealengine.com/5.0/en-US/navigation-system-in-unreal-engine/" target="_blank" rel="noreferrer noopener">Official Unreal Engine Navigation documentation<br></a><br></p>
<p>The post <a href="https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/">Setting up a NavMesh in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/setting-up-a-navmesh-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Save and Load in Unreal Engine 5</title>
		<link>https://couchlearn.com/how-to-save-and-load-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/how-to-save-and-load-in-unreal-engine-5/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Thu, 22 Dec 2022 22:05:22 +0000</pubDate>
				<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 4]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[medium]]></category>
		<category><![CDATA[save and load]]></category>
		<category><![CDATA[save game]]></category>
		<category><![CDATA[savegame]]></category>
		<category><![CDATA[saving and load]]></category>
		<category><![CDATA[saving and loading]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue4 save and load]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 save and load]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 4]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 save and load]]></category>
		<category><![CDATA[unreal engine save and load]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1946</guid>

					<description><![CDATA[<p>Saving and loading of game data is a essential part of every modern game. Luckily for you, Unreal Engine has a built in SaveGame system <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-save-and-load-in-unreal-engine-5/" title="How to Save and Load in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-save-and-load-in-unreal-engine-5/">How to Save and Load in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Saving and loading of game data is a essential part of every modern game. Luckily for you, Unreal Engine has a built in SaveGame system that allows easy saving and loading of your game data to a file. All data saved to this file can be loaded easily with only a few functions!<br><br>In this guide you will learn how to Save and Load in Unreal Engine 5.</p>



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



<p>To follow this guide you need to understand the basics of Unreal Engine, working with blueprints inside the editor and using a custom Game Instance. We have linked guides below to these topics.<br><a href="https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/Blueprints/BP_HowTo/BasicUsage/" target="_blank" rel="noreferrer noopener">The basics of blueprint actors.<br></a><a href="https://docs.unrealengine.com/4.26/en-US/ProgrammingAndScripting/Blueprints/UserGuide/Variables/" target="_blank" rel="noreferrer noopener">Adding variables to blueprint actors</a>.<br><a href="https://couchlearn.com/how-to-use-the-game-instance-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">How to use custom Game Instances.</a><br><a href="https://couchlearn.com/how-to-use-custom-events-in-unreal-engine-4/" target="_blank" rel="noreferrer noopener">Custom Events in Unreal Engine.<br></a><br>It would also be beneficial to understand how Input Actions work in Unreal Engine:<br><a href="https://couchlearn.com/how-to-use-input-actions-and-input-axis-mappings-in-your-unreal-engine-4-game/" target="_blank" rel="noreferrer noopener">Click here to learn how to use input actions and axis.</a></p>



<h2 class="wp-block-heading">How it Works</h2>



<p>SaveGame is a class in Unreal Engine that is preconfigured to save and load the data contained in the variables you add.<br><br>The variables you set are then saved to a file stored on the user&#8217;s machine. This is then read and the variables can be accessed in your game.<br><br>The save file is located in these locations:<br>Windows: Local Appdata folder<br>MacOS: Library/Application Support<br>Linux: /home/username/.local/share<br><br><strong>Almost every variable type can be saved and loaded using the SaveGame class.</strong></p>



<h2 class="wp-block-heading">Creating our Save Class</h2>



<p>Firstly, create a new blueprint class from the content drawer.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="953" height="893" src="https://couchlearn.com/wp-content/uploads/2022/12/image-22.png" alt="Creating the blueprint class from the content drawer" class="wp-image-1949" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-22.png 953w, https://couchlearn.com/wp-content/uploads/2022/12/image-22-300x281.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-22-768x720.png 768w" sizes="(max-width: 953px) 100vw, 953px" /></figure>



<p>Next, in the popup window, click the drop down arrow at the bottom. In the search bar type &#8220;SaveGame&#8221; and click the option from the list.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="626" height="555" src="https://couchlearn.com/wp-content/uploads/2022/12/image-23.png" alt="Creating the SaveGame blueprint class." class="wp-image-1950" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-23.png 626w, https://couchlearn.com/wp-content/uploads/2022/12/image-23-300x266.png 300w" sizes="(max-width: 626px) 100vw, 626px" /></figure>



<p>Then, give your new SaveGame blueprint a suitable name. We need to remember this as it is used later. In our case, we used the name DemoSaveGame.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="381" height="343" src="https://couchlearn.com/wp-content/uploads/2022/12/image-24.png" alt="Naming our SaveGame blueprint &quot;DemoSaveGame&quot;." class="wp-image-1951" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-24.png 381w, https://couchlearn.com/wp-content/uploads/2022/12/image-24-300x270.png 300w" sizes="(max-width: 381px) 100vw, 381px" /></figure>



<h3 class="wp-block-heading">Saving the variables</h3>



<p>Now that your SaveGame class has been created, you can add any variables you need for your project.<br><br>For this demo we create a new <em>Vector</em> variable called &#8220;PlayerPosition&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="682" height="444" src="https://couchlearn.com/wp-content/uploads/2022/12/image-25.png" alt="Creating a new Vector variable named PlayerPosition in the DemoSaveGame blueprint class." class="wp-image-1952" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-25.png 682w, https://couchlearn.com/wp-content/uploads/2022/12/image-25-300x195.png 300w" sizes="(max-width: 682px) 100vw, 682px" /></figure>



<p>Once you have created the variables you need for your project, click Compile and Save to ensure your changes are applied and saved.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="387" height="237" src="https://couchlearn.com/wp-content/uploads/2022/12/image-26.png" alt="Compiling and saving the previous changes." class="wp-image-1954" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-26.png 387w, https://couchlearn.com/wp-content/uploads/2022/12/image-26-300x184.png 300w" sizes="(max-width: 387px) 100vw, 387px" /></figure>



<h2 class="wp-block-heading">Adding Save and Load Functionality</h2>



<p>Firstly, in our <strong><em><a href="http://couchlearn.com/how-to-use-the-game-instance-in-unreal-engine-4/(opens in a new tab)" target="_blank" rel="noreferrer noopener">Game Instance</a></em></strong>, add two new custom events. &#8220;Save&#8221; and &#8220;Load&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="213" height="256" src="https://couchlearn.com/wp-content/uploads/2022/12/image-27.png" alt="Creating two new events in the Game Instance. &quot;Save&quot; and &quot;Load&quot;" class="wp-image-1958"/></figure>



<p>We also need to add a new variable on the <strong><em>Game Instance</em></strong>. Name this variable SaveGame and set the type to the class you created in the previous step.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="637" height="387" src="https://couchlearn.com/wp-content/uploads/2022/12/image-33.png" alt="Creating a variable to store the SaveGame object." class="wp-image-1968" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-33.png 637w, https://couchlearn.com/wp-content/uploads/2022/12/image-33-300x182.png 300w" sizes="(max-width: 637px) 100vw, 637px" /></figure>



<h3 class="wp-block-heading">Loading our Variables from the Save File</h3>



<p>Now that our Game Instance is setup, on the Load event, create a new &#8220;Does Save Game Exist&#8221; node. The &#8220;Slot Name&#8221; pin needs to be given a name. This can be set to anything you want. Each different name you use saves to a different file.<br><br>In our case we just named this &#8220;savegame&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="514" height="209" src="https://couchlearn.com/wp-content/uploads/2022/12/image-29.png" alt="Creating the Does Save Game Exist node on our Load Event." class="wp-image-1962" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-29.png 514w, https://couchlearn.com/wp-content/uploads/2022/12/image-29-300x122.png 300w" sizes="(max-width: 514px) 100vw, 514px" /></figure>



<p>Next, add a branch to the output pin of the &#8220;Does Save Game Exist&#8221; node. This will branch if our save file exists or not.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="701" height="192" src="https://couchlearn.com/wp-content/uploads/2022/12/image-30.png" alt="Creating a branch node from the Does Save Game Exist node." class="wp-image-1963" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-30.png 701w, https://couchlearn.com/wp-content/uploads/2022/12/image-30-300x82.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></figure>



<h4 class="wp-block-heading">If the Save File Exists</h4>



<p>From the &#8220;True&#8221; pin, create a new &#8220;Load Game From Slot&#8221; node with the same &#8220;Slot Name&#8221; as before.</p>



<figure class="wp-block-image size-full is-resized"><img decoding="async" src="https://couchlearn.com/wp-content/uploads/2022/12/image-31.png" alt="Creating the Load Game From Slot node from the Branch node." class="wp-image-1964" width="840" height="152" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-31.png 1016w, https://couchlearn.com/wp-content/uploads/2022/12/image-31-300x55.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-31-768x140.png 768w" sizes="(max-width: 840px) 100vw, 840px" /></figure>



<p>Next, from the blue output pin, create a &#8220;Cast to&#8221; node. This should cast to the class you created in the first step. For us this is &#8220;Cast to DemoSaveGame&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="889" height="176" src="https://couchlearn.com/wp-content/uploads/2022/12/image-32.png" alt="Creating the Cast to DemoSaveGame node from the Load Game from Slot blue output pin." class="wp-image-1965" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-32.png 889w, https://couchlearn.com/wp-content/uploads/2022/12/image-32-300x59.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-32-768x152.png 768w" sizes="(max-width: 889px) 100vw, 889px" /></figure>



<p>Then set the Game Instance&#8217;s Save Game variable we created earlier to the output of the &#8220;Cast to&#8221; node.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="893" height="219" src="https://couchlearn.com/wp-content/uploads/2022/12/image-34.png" alt="Setting the SaveGame object variable to the output of the Cast to DemoSaveGame node." class="wp-image-1970" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-34.png 893w, https://couchlearn.com/wp-content/uploads/2022/12/image-34-300x74.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-34-768x188.png 768w" sizes="(max-width: 893px) 100vw, 893px" /></figure>



<p>From there, we create a &#8220;Set Actor Location&#8221; node. This will be used to move our character to the saved location.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="841" height="407" src="https://couchlearn.com/wp-content/uploads/2022/12/image-35.png" alt="Creating a Set Actor Location node from the Set Save Game node." class="wp-image-1972" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-35.png 841w, https://couchlearn.com/wp-content/uploads/2022/12/image-35-300x145.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-35-768x372.png 768w" sizes="(max-width: 841px) 100vw, 841px" /></figure>



<p>From the variables list on the left of the editor, drag the &#8220;SaveGame&#8221; variable and drop near the the nodes. This will show a list of options. Click the &#8220;Get SaveGame&#8221; option to allow us easy access to this variable for the next few steps.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="329" src="https://couchlearn.com/wp-content/uploads/2022/12/image-41-1024x329.png" alt="Creating a Get Save Game node from the SaveGame variable." class="wp-image-1980" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-41-1024x329.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-41-300x96.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-41-768x247.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-41.png 1297w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Dragging from the &#8220;Save Game&#8221; blue pin then typing &#8220;get player position&#8221;, we can see our &#8220;Player Position&#8221; Vector variable that we created earlier. Click this option in the list to add it to the blueprint graph.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1013" height="329" src="https://couchlearn.com/wp-content/uploads/2022/12/image-42.png" alt="Getting the PlayerPosition variable from the SaveGame class." class="wp-image-1981" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-42.png 1013w, https://couchlearn.com/wp-content/uploads/2022/12/image-42-300x97.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-42-768x249.png 768w" sizes="(max-width: 1013px) 100vw, 1013px" /></figure>



<p>Next, connect the &#8220;Player Position&#8221; vector pin to the &#8220;New Location&#8221; option on the &#8220;Set Actor Location&#8221; node.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="940" height="291" src="https://couchlearn.com/wp-content/uploads/2022/12/image-43.png" alt="Setting the Actor Location to the Player Position value." class="wp-image-1982" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-43.png 940w, https://couchlearn.com/wp-content/uploads/2022/12/image-43-300x93.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-43-768x238.png 768w" sizes="(max-width: 940px) 100vw, 940px" /></figure>



<p>Lastly, create a &#8220;Get Player Character&#8221; node and connect this to the &#8220;Target&#8221; pin of the &#8220;Set Actor Location&#8221; node. This now gets our saved player position and moves the player character to it.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="988" height="312" src="https://couchlearn.com/wp-content/uploads/2022/12/image-44.png" alt="Creating a Get Player Character variable and assigning the output pin to the Set Actor Location Target pin." class="wp-image-1983" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-44.png 988w, https://couchlearn.com/wp-content/uploads/2022/12/image-44-300x95.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-44-768x243.png 768w" sizes="(max-width: 988px) 100vw, 988px" /></figure>



<h4 class="wp-block-heading">If the Save File doesn&#8217;t Exist</h4>



<p>If the save file does not exist then we need to create a new file. From the &#8220;False&#8221; pin create a new &#8220;Create Save Game Object&#8221; node. Then set the &#8220;Save Game Class&#8221; purple pin to the custom SaveGame class we created earlier.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="998" height="390" src="https://couchlearn.com/wp-content/uploads/2022/12/image-40.png" alt="Creating a Save Game Object from the false pin on the branch node." class="wp-image-1978" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-40.png 998w, https://couchlearn.com/wp-content/uploads/2022/12/image-40-300x117.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-40-768x300.png 768w" sizes="(max-width: 998px) 100vw, 998px" /></figure>



<p>Then, set the Game Instance &#8220;Save Game&#8221; variable to the blue output pin value.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="859" height="345" src="https://couchlearn.com/wp-content/uploads/2022/12/image-45.png" alt="Setting the SaveGame variable to the return value of the Create Save Game Object node." class="wp-image-1984" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-45.png 859w, https://couchlearn.com/wp-content/uploads/2022/12/image-45-300x120.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-45-768x308.png 768w" sizes="(max-width: 859px) 100vw, 859px" /></figure>



<p>Lastly, connect the &#8220;Set Save Game&#8221; node to the blueprint nodes above. This can be done by double clicking the white lines to create points. <br><br>Connect the blueprints nodes together as shown in the image below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="974" height="372" src="https://couchlearn.com/wp-content/uploads/2022/12/image-46.png" alt="Cleaning the blueprints for easy reading." class="wp-image-1985" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-46.png 974w, https://couchlearn.com/wp-content/uploads/2022/12/image-46-300x115.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-46-768x293.png 768w" sizes="(max-width: 974px) 100vw, 974px" /></figure>



<h3 class="wp-block-heading">Saving our Variables to the Save File</h3>



<p>Now that we can load saved variables, we need to save the variables!<br><br>Firstly, drag and drop the SaveGame variable and click &#8220;Get SaveGame&#8221; next to the Save event.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="883" height="369" src="https://couchlearn.com/wp-content/uploads/2022/12/image-47.png" alt="Getting the value of the SaveGame variable." class="wp-image-1987" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-47.png 883w, https://couchlearn.com/wp-content/uploads/2022/12/image-47-300x125.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-47-768x321.png 768w" sizes="(max-width: 883px) 100vw, 883px" /></figure>



<p>From there, we create an &#8220;? Is Valid&#8221; node. This allows us to branch the code if our save file has been loaded or not.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="637" height="281" src="https://couchlearn.com/wp-content/uploads/2022/12/image-51.png" alt="Creating an Is Valid node connect to the SaveGame variable value." class="wp-image-1992" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-51.png 637w, https://couchlearn.com/wp-content/uploads/2022/12/image-51-300x132.png 300w" sizes="(max-width: 637px) 100vw, 637px" /></figure>



<h4 class="wp-block-heading">If the Save File is Valid</h4>



<p>From our &#8220;Save Game&#8221; blue variable, create a &#8220;Set Player Position&#8221; node and connect it to the &#8220;Is Valid&#8221; pin.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="637" height="299" src="https://couchlearn.com/wp-content/uploads/2022/12/image-52.png" alt="Setting the Player Position variable if the SaveGame object reference is valid." class="wp-image-1993" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-52.png 637w, https://couchlearn.com/wp-content/uploads/2022/12/image-52-300x141.png 300w" sizes="(max-width: 637px) 100vw, 637px" /></figure>



<p>Next, create a &#8220;Get Player Character&#8221; node and from the blue output pin, create a &#8220;Get Actor Location&#8221; pin.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="741" height="353" src="https://couchlearn.com/wp-content/uploads/2022/12/image-53.png" alt="Creating a get player character node and getting the actor location." class="wp-image-1994" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-53.png 741w, https://couchlearn.com/wp-content/uploads/2022/12/image-53-300x143.png 300w" sizes="(max-width: 741px) 100vw, 741px" /></figure>



<p>Lastly, connect the yellow output pin of the &#8220;Get Actor Location&#8221; node to the yellow input pin on the &#8220;Set Player Position&#8221; node. Now if our save game object is valid we will save the player character location to the save file on disk.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="658" height="307" src="https://couchlearn.com/wp-content/uploads/2022/12/image-54.png" alt="Connecting the Get Actor Location output value to the Set Player Position node." class="wp-image-1995" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-54.png 658w, https://couchlearn.com/wp-content/uploads/2022/12/image-54-300x140.png 300w" sizes="(max-width: 658px) 100vw, 658px" /></figure>



<h4 class="wp-block-heading">If the Save File is not Valid</h4>



<p>If the save game object isn&#8217;t valid, we need to create it before saving any data.<br><br>Firstly, create a &#8220;Create Save Game Object&#8221; node, set the purple input value to our previously created save game class, then connect this to the &#8220;Is Not Valid&#8221; pin as shown below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="831" height="324" src="https://couchlearn.com/wp-content/uploads/2022/12/image-55.png" alt="Creating a Create Save Game Object node from the Is Not Valid pin." class="wp-image-1996" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-55.png 831w, https://couchlearn.com/wp-content/uploads/2022/12/image-55-300x117.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-55-768x299.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></figure>



<p>Next, set the Game Instance SaveGame variable to the blue output pin of the &#8220;Create Save Game Object&#8221; node.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="347" src="https://couchlearn.com/wp-content/uploads/2022/12/image-56-1024x347.png" alt="Setting the Save Game value to the output of the Create Save Game Object node." class="wp-image-1997" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-56-1024x347.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-56-300x102.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-56-768x260.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-56.png 1059w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then, connect the &#8220;Set Save Game&#8221; node to the &#8220;Set Player Position&#8221; node as shown below. This will save the player character&#8217;s position after the &#8220;Save Game&#8221; object is valid.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="272" src="https://couchlearn.com/wp-content/uploads/2022/12/image-57-1024x272.png" alt="Connecting the Set SaveGame node to the other blueprints and cleaning them up." class="wp-image-1998" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-57-1024x272.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-57-300x80.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-57-768x204.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-57.png 1057w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Finally, create either a &#8220;Save Game to Slot&#8221; or &#8220;Async Save Game to Slot&#8221; node from the blue SaveGame variable.<br><br><strong><em>If your game needs to save lots of information, use the &#8220;Async Save Game to Slot&#8221; node.<br></em></strong><br><strong><em>If your game only saves a small amount of data, use the &#8220;Save Game to Slot&#8221; node.</em></strong></p>



<figure class="wp-block-image size-full"><img decoding="async" width="851" height="249" src="https://couchlearn.com/wp-content/uploads/2022/12/image-62.png" alt="Creating a Save the Game to Slot node from the SaveGame variable." class="wp-image-2003" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-62.png 851w, https://couchlearn.com/wp-content/uploads/2022/12/image-62-300x88.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-62-768x225.png 768w" sizes="(max-width: 851px) 100vw, 851px" /></figure>



<p>Make sure to set the &#8220;Slot Name&#8221; variable to the name you used earlier. In our case this was &#8220;savegame&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="637" height="303" src="https://couchlearn.com/wp-content/uploads/2022/12/image-63.png" alt="Saving the game to the savegame slot." class="wp-image-2004" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-63.png 637w, https://couchlearn.com/wp-content/uploads/2022/12/image-63-300x143.png 300w" sizes="(max-width: 637px) 100vw, 637px" /></figure>



<h2 class="wp-block-heading">Saving and Loading the Player Position</h2>



<p>Now that your Save and Load system is complete, we need to trigger this functionality.</p>



<p>In your Player Character class add an Key Press Event. For this guide we used the number 1 key from our ThirdPersonCharacterBP class.<br><br>From there, create a &#8220;Get Game Instance&#8221; node and a &#8220;Cast To&#8221; node to your custom game instance. Connect the two as shown below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="507" height="232" src="https://couchlearn.com/wp-content/uploads/2022/12/image-58.png" alt="Casting to the GameInstance from the Number 1 Key event" class="wp-image-1999" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-58.png 507w, https://couchlearn.com/wp-content/uploads/2022/12/image-58-300x137.png 300w" sizes="(max-width: 507px) 100vw, 507px" /></figure>



<p>Next, from the blue &#8220;As Game Instance&#8221; pin, call the &#8220;Save&#8221; event we created earlier. Now when we press the number 1 key, our game will save the current player character&#8217;s position to the save file.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="935" height="279" src="https://couchlearn.com/wp-content/uploads/2022/12/image-59.png" alt="Calling the Save event from the Number 1 Key event Cast to Game Instance nodes." class="wp-image-2000" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-59.png 935w, https://couchlearn.com/wp-content/uploads/2022/12/image-59-300x90.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-59-768x229.png 768w" sizes="(max-width: 935px) 100vw, 935px" /></figure>



<p>Repeat the previous step for the number 2 key as shown in the image below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="515" height="223" src="https://couchlearn.com/wp-content/uploads/2022/12/image-60.png" alt="Repeating the previous nodes for the Number 2 Key event" class="wp-image-2001" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-60.png 515w, https://couchlearn.com/wp-content/uploads/2022/12/image-60-300x130.png 300w" sizes="(max-width: 515px) 100vw, 515px" /></figure>



<p>Finally, call the &#8220;Load&#8221; event from the &#8220;As Game Instance&#8221; blue pin. This will now load our saved player position from the save file and teleport our player to that position.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="737" height="223" src="https://couchlearn.com/wp-content/uploads/2022/12/image-61.png" alt="Calling the Load event from the Number 2 Key Cast to Game Instance nodes." class="wp-image-2002" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-61.png 737w, https://couchlearn.com/wp-content/uploads/2022/12/image-61-300x91.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></figure>



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



<figure class="wp-block-image size-full"><img decoding="async" width="800" height="449" src="https://couchlearn.com/wp-content/uploads/2022/12/SaveAndLoadDemo.webp" alt="The player character saving and loading the location to and from the save file affecting the gameplay." class="wp-image-2006"/></figure>



<h2 class="wp-block-heading">Download the Project Files</h2>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://gumroad.com/l/jwouk">Loading&#8230;</a></div>



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



<p>Now your project has saving and loading capabilities!<br><br>This is a very basic implementation but allows you to expand this further. Any data you want to save and load can be implemented into the events we created during this guide. <br><br>An example of this would be the player&#8217;s health. This variable could be created on the SaveGame, saved and loaded onto the character with minimal setup.<br><br>Further Reading:<br><a href="https://docs.unrealengine.com/4.26/en-US/InteractiveExperiences/SaveGame/#:~:text=Creating%20a%20SaveGame%20Object&amp;text=When%20the%20Pick%20Parent%20Class,you%20would%20like%20to%20save." target="_blank" rel="noreferrer noopener">Official UE4/5 documentation for the Saving and Loading in the engine.</a><br><a href="https://www.tomlooman.com/unreal-engine-cpp-save-system/" target="_blank" rel="noreferrer noopener">Tom Looman&#8217;s great guide for implementing Saving and Loading for C++ classes</a></p>
<p>The post <a href="https://couchlearn.com/how-to-save-and-load-in-unreal-engine-5/">How to Save and Load in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-save-and-load-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>How to Install Plugins for Unreal Engine 5</title>
		<link>https://couchlearn.com/how-to-install-plugins-for-unreal-engine-5/</link>
					<comments>https://couchlearn.com/how-to-install-plugins-for-unreal-engine-5/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Sat, 17 Dec 2022 23:24:36 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[How to Install Plugins for Unreal Engine 4]]></category>
		<category><![CDATA[How to Install Plugins for Unreal Engine 5]]></category>
		<category><![CDATA[ue plugins]]></category>
		<category><![CDATA[ue4]]></category>
		<category><![CDATA[ue4 plugins]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 plugins]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 4]]></category>
		<category><![CDATA[unreal engine 4 plugins]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 plugins]]></category>
		<category><![CDATA[unreal engine plugins]]></category>
		<category><![CDATA[unreal plugins]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1580</guid>

					<description><![CDATA[<p>Many features of Unreal Engine 5 are exclusive to C++ and cannot be used in Blueprints. Through the great developer community, plugins can be downloaded <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-install-plugins-for-unreal-engine-5/" title="How to Install Plugins for Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-install-plugins-for-unreal-engine-5/">How to Install Plugins for Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Many features of Unreal Engine 5 are exclusive to C++ and cannot be used in Blueprints. Through the great developer community, plugins can be downloaded and installed to add more Blueprint nodes and other functionality! <br><br>In this guide we will be showing how to install plugins for Unreal Engine 5.</p>



<h2 class="wp-block-heading">Unreal Marketplace Plugins</h2>



<p>Firstly, open the Epic Games Launcher and navigate to the Unreal Marketplace.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="506" src="https://couchlearn.com/wp-content/uploads/2022/12/image-10-1024x506.png" alt="Unreal engine marketplace in the epic games launcher" class="wp-image-1922" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-10-1024x506.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-10-300x148.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-10-768x380.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-10-1536x759.png 1536w, https://couchlearn.com/wp-content/uploads/2022/12/image-10.png 1546w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Next, in the &#8220;Browse&#8221; tab, click the &#8220;Code Plugins&#8221; option.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="447" src="https://couchlearn.com/wp-content/uploads/2022/12/image-11-1024x447.png" alt="Browsing the marketplace content to download" class="wp-image-1923" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-11-1024x447.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-11-300x131.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-11-768x335.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-11.png 1301w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then, choose the plugin you want to install. <strong>For this guide we are using the VaRest network plugin.</strong><br><br>If you do not already own the plugin, click add to cart and complete the purchase.<br><br><strong>Free plugins still need to be &#8220;purchased&#8221; but you are not charged</strong>.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="596" src="https://couchlearn.com/wp-content/uploads/2022/12/image-12-1024x596.png" alt="VaRest networking plugin in the code plugins section of the marketplace" class="wp-image-1924" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-12-1024x596.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-12-300x175.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-12-768x447.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-12.png 1265w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>As these plugins are installed to the engine, we need to click the &#8220;Install to Engine&#8221; button.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="589" src="https://couchlearn.com/wp-content/uploads/2022/12/image-14-1024x589.png" alt="Installing the VaRest plugin to Unreal Engine" class="wp-image-1926" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-14-1024x589.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-14-300x173.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-14-768x442.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-14.png 1302w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Then, choose the engine version you would like to install the plugin to.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="583" src="https://couchlearn.com/wp-content/uploads/2022/12/image-15-1024x583.png" alt="Installing the plugin to the selected engine version" class="wp-image-1927" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-15-1024x583.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-15-300x171.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-15-768x437.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-15.png 1301w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Lastly, the plugin is now shown in the downloads tab of the Epic Games Launcher. Once the plugin has been successfully installed continue to the final step.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="489" height="588" src="https://couchlearn.com/wp-content/uploads/2022/12/image-16.png" alt="Download progress of the VaRest unreal engine plugin" class="wp-image-1928" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-16.png 489w, https://couchlearn.com/wp-content/uploads/2022/12/image-16-249x300.png 249w" sizes="(max-width: 489px) 100vw, 489px" /></figure>



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



<p>New plugins are not enabled in the project by default. This is to prevent all projects building unnecessary code and increasing your executable size. In this final step we need to enable the plugin on your project.<br><br>Firstly, to enable the plugin, click &#8220;Edit&#8221; then &#8220;Plugins&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="815" height="447" src="https://couchlearn.com/wp-content/uploads/2022/12/image-17.png" alt="Opening the Unreal Engine plugin tab" class="wp-image-1931" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-17.png 815w, https://couchlearn.com/wp-content/uploads/2022/12/image-17-300x165.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-17-768x421.png 768w" sizes="(max-width: 815px) 100vw, 815px" /></figure>



<p>Once the Plugins tab has opened, type the name of the plugin in the search box to find the newly installed plugin details.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="252" src="https://couchlearn.com/wp-content/uploads/2022/12/image-19-1024x252.png" alt="Finding the VaRest plugin in the plugins tab" class="wp-image-1933" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-19-1024x252.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-19-300x74.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-19-768x189.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-19.png 1463w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Finally, click the check box for the plugin, then click the &#8220;Restart Now&#8221; button. This will restart the editor and allow use of the plugin in C++ and Blueprints.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://couchlearn.com/wp-content/uploads/2022/12/image-20-1024x576.png" alt="Enabling the VaRest plugin in the Unreal Engine 5 project" class="wp-image-1934" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-20-1024x576.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-20-300x169.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-20-768x432.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-20-678x381.png 678w, https://couchlearn.com/wp-content/uploads/2022/12/image-20.png 1286w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading">Manually Installed Plugins (Advanced)</h2>



<h3 class="wp-block-heading">Disclaimer</h3>



<p><strong>BE CAREFUL when downloading untrusted files and code online.</strong><br><br><strong>Only download Unreal Engine plugins from trusted sources.</strong><br><br><strong>CouchLearn is not responsible for any damage caused by downloading unknown files</strong>.<br><br><strong>Make sure the plugin you are downloading is compatible with the version of Unreal Engine 5 that you have installed.</strong></p>



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



<p>To demonstrate the steps of installing a UE5 plugin manually, we will be using the Victory BP plugin by Rama.<br><br>Firstly, we need to make sure your project folder contains a &#8220;Plugins&#8221; folder. <br><br>If this folder does not exist, simply create a new folder named &#8220;Plugins&#8221;.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="608" height="274" src="https://couchlearn.com/wp-content/uploads/2021/04/image.png" alt="Plugins folder found in the project directory" class="wp-image-1582" srcset="https://couchlearn.com/wp-content/uploads/2021/04/image.png 608w, https://couchlearn.com/wp-content/uploads/2021/04/image-300x135.png 300w" sizes="(max-width: 608px) 100vw, 608px" /></figure>



<p>Then, copy your plugin&#8217;s folder into the Plugins folder shown above.<br><br>For example we copied the VictoryPlugin folder compatible with Unreal Engine 5.0 into the Plugins folder of the project. </p>



<figure class="wp-block-image size-large"><img decoding="async" width="607" height="131" src="https://couchlearn.com/wp-content/uploads/2021/04/image-1.png" alt="Copying the plugin into the plugins folder" class="wp-image-1584" srcset="https://couchlearn.com/wp-content/uploads/2021/04/image-1.png 607w, https://couchlearn.com/wp-content/uploads/2021/04/image-1-300x65.png 300w" sizes="(max-width: 607px) 100vw, 607px" /></figure>



<p>Inside this folder is the plugin files downloaded from the Victory Plugin Unreal Engine forums page.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="643" height="186" src="https://couchlearn.com/wp-content/uploads/2021/04/image-2.png" alt="Inside the newly copy and pasted plugin folder with all the files required for the plugin to function" class="wp-image-1585" srcset="https://couchlearn.com/wp-content/uploads/2021/04/image-2.png 643w, https://couchlearn.com/wp-content/uploads/2021/04/image-2-300x87.png 300w" sizes="(max-width: 643px) 100vw, 643px" /></figure>



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



<p>Plugins are not enabled by default. This is to prevent all projects building unnecessary code and increasing your executable size. In this final step we need to enable the plugin on your project.<br><br>Firstly, to enable the plugin, click &#8220;Edit&#8221; then &#8220;Plugins&#8221;.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="815" height="447" src="https://couchlearn.com/wp-content/uploads/2022/12/image-17.png" alt="Opening the Unreal Engine plugin tab" class="wp-image-1931" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-17.png 815w, https://couchlearn.com/wp-content/uploads/2022/12/image-17-300x165.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-17-768x421.png 768w" sizes="(max-width: 815px) 100vw, 815px" /></figure>



<p>Once the Plugins tab has opened, type the name of the plugin in the search box to find the newly installed plugin details.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="252" src="https://couchlearn.com/wp-content/uploads/2022/12/image-18-1024x252.png" alt="Finding the VaRest plugin in the plugins tab" class="wp-image-1932" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-18-1024x252.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-18-300x74.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-18-768x189.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-18.png 1463w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Finally, click the check box for the plugin, then click the &#8220;Restart Now&#8221; button. This will restart the editor and allow use of the plugin in C++ and Blueprints.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="576" src="https://couchlearn.com/wp-content/uploads/2022/12/image-21-1024x576.png" alt="Enabling the VaRest plugin in the Unreal Engine 5 project" class="wp-image-1935" srcset="https://couchlearn.com/wp-content/uploads/2022/12/image-21-1024x576.png 1024w, https://couchlearn.com/wp-content/uploads/2022/12/image-21-300x169.png 300w, https://couchlearn.com/wp-content/uploads/2022/12/image-21-768x432.png 768w, https://couchlearn.com/wp-content/uploads/2022/12/image-21-678x381.png 678w, https://couchlearn.com/wp-content/uploads/2022/12/image-21.png 1286w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



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



<p>Now your Unreal Engine 5 project has new functionality!<br><br>Plugins can infinitely extend the functionality of your project, the engine, and even the editor itself! The Unreal Engine Marketplace has hundreds of quality plugins that can give your project the features you need to realize your vision!<br><br>Further Reading:<br><a href="https://docs.unrealengine.com/5.0/en-US/plugins-in-unreal-engine/" target="_blank" rel="noreferrer noopener">Click here to read the official documentation for making your own plugins in Unreal Engine<br></a><a href="https://www.unrealengine.com/marketplace/en-US/content-cat/assets/codeplugins" target="_blank" rel="noreferrer noopener">Click here to see the code plugins on the Unreal Engine Marketplace</a></p>
<p>The post <a href="https://couchlearn.com/how-to-install-plugins-for-unreal-engine-5/">How to Install Plugins for Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-install-plugins-for-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to add MetaHumans into your UE5 project</title>
		<link>https://couchlearn.com/how-to-add-metahumans-into-your-ue5-project/</link>
					<comments>https://couchlearn.com/how-to-add-metahumans-into-your-ue5-project/#respond</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Mon, 05 Dec 2022 21:25:12 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[easy difficulty]]></category>
		<category><![CDATA[MetaHuman]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 metahuman]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 metahuman]]></category>
		<category><![CDATA[unreal engine metahuman]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1791</guid>

					<description><![CDATA[<p>Unreal Engine 5 brings the new MetaHuman character library. These high fidelity digital humans are free to use as characters in your own projects! In <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-add-metahumans-into-your-ue5-project/" title="How to add MetaHumans into your UE5 project">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-add-metahumans-into-your-ue5-project/">How to add MetaHumans into your UE5 project</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Unreal Engine 5 brings the new MetaHuman character library. These high fidelity digital humans are free to use as characters in your own projects!<br><br>In this guide we will be showing you how to use MetaHumans in your UE5 project.</p>



<h2 class="wp-block-heading">Accessing the MetaHuman Library</h2>



<p>Firstly, click the Window tab in the Unreal Engine editor and click &#8220;Quixel Bridge&#8221;.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="686" src="https://couchlearn.com/wp-content/uploads/2022/11/image-12-1024x686.png" alt="Opening the Quixel Bridge tab in the Unreal Engine 5 editor." class="wp-image-1829" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-12-1024x686.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-12-300x201.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-12-768x514.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-12.png 1133w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Once the Quixel Bridge has opened in the editor, click the MetaHumans tab.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="906" height="650" src="https://couchlearn.com/wp-content/uploads/2022/11/image-13.png" alt="Clicking the MetaHumans tab in the Quixel Bridge window." class="wp-image-1830" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-13.png 906w, https://couchlearn.com/wp-content/uploads/2022/11/image-13-300x215.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-13-768x551.png 768w" sizes="(max-width: 906px) 100vw, 906px" /></figure>



<p>Now you see all of the preconfigured MetaHumans available to download and add to your project.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="527" src="https://couchlearn.com/wp-content/uploads/2022/11/image-14-1024x527.png" alt="Browsing the MetaHuman library of meshes" class="wp-image-1831" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-14-1024x527.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-14-300x154.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-14-768x395.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-14-1536x790.png 1536w, https://couchlearn.com/wp-content/uploads/2022/11/image-14.png 1594w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Before you can download your chosen MetaHuman to the opened project, click one of the avatars in the grid. You should see the Sign In button on the bottom right of the window.<br><br>Continue logging into your Epic Games account to access the full Quixel Megascans and MetaHuman library.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="652" height="414" src="https://couchlearn.com/wp-content/uploads/2022/11/image-16.png" alt="Signing into the Quixel Bridge window using the Epic Games account." class="wp-image-1833" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-16.png 652w, https://couchlearn.com/wp-content/uploads/2022/11/image-16-300x190.png 300w" sizes="(max-width: 652px) 100vw, 652px" /></figure>



<h2 class="wp-block-heading">Adding the character to your Project</h2>



<p>Now that you are fully logged into the Quixel Bridge tab, click one of the MetaHuman avatars and click Download. Once the MetaHuman is downloaded successfully, click the Add button.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="398" src="https://couchlearn.com/wp-content/uploads/2022/11/image-15-1024x398.png" alt="Downloading the MetaHuman and adding the asset to the project" class="wp-image-1832" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-15-1024x398.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-15-300x117.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-15-768x299.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-15-1536x597.png 1536w, https://couchlearn.com/wp-content/uploads/2022/11/image-15.png 1587w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>The editor will now be importing your chosen MetaHuman into the open project. If any notifications pop up in the bottom left of the editor, press &#8220;Enable Missing&#8221; to allow the editor to configure your project for MetaHumans.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1002" height="730" src="https://couchlearn.com/wp-content/uploads/2022/11/image-17.png" alt="Enabling missing plugins and project settings used for MetaHumans" class="wp-image-1834" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-17.png 1002w, https://couchlearn.com/wp-content/uploads/2022/11/image-17-300x219.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-17-768x560.png 768w" sizes="(max-width: 1002px) 100vw, 1002px" /></figure>



<p>Once you have enabled the missing settings and plugins, press the &#8220;Restart Now&#8221; button to restart the editor with the new settings applied.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="486" height="254" src="https://couchlearn.com/wp-content/uploads/2022/11/image-18.png" alt="Restarting the editor" class="wp-image-1835" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-18.png 486w, https://couchlearn.com/wp-content/uploads/2022/11/image-18-300x157.png 300w" sizes="(max-width: 486px) 100vw, 486px" /></figure>



<p>In the Content Drawer, click the &#8220;MetaHumans&#8221; folder and find the folder name of the MetaHuman you chose in the previous step. Your downloaded MetaHuman can now be found setup in the asset starting with &#8220;BP_&#8221;.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="350" src="https://couchlearn.com/wp-content/uploads/2022/11/image-19-1024x350.png" alt="Finding the asset in the Content Drawer" class="wp-image-1836" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-19-1024x350.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-19-300x103.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-19-768x263.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-19.png 1486w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



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



<p>Now your project has a ready to use MetaHuman blueprint! As you can see in the blueprint, there are multiple meshes that make up the full character. These meshes can be used as your player character as they are fully rigged!<br><br>In the future you will be able to make your own custom MetaHumans using the MetaHuman creator tool. <br><br><strong>Further Reading<br></strong><a href="https://www.unrealengine.com/en-US/metahuman">Custom MetaHumans using the MetaHuman creator</a></p>



<p><a href="https://www.unrealengine.com/en-US/metahuman" target="_blank" rel="noreferrer noopener">Official MetaHuman Unreal Engine page</a></p>



<p><a href="https://docs.metahuman.unrealengine.com/en-US/" target="_blank" rel="noreferrer noopener">Unreal Engine 5 MetaHuman documentation</a></p>
<p>The post <a href="https://couchlearn.com/how-to-add-metahumans-into-your-ue5-project/">How to add MetaHumans into your UE5 project</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-add-metahumans-into-your-ue5-project/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to add Double Jumping in Unreal Engine 5</title>
		<link>https://couchlearn.com/how-to-add-double-jumping-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/how-to-add-double-jumping-in-unreal-engine-5/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Wed, 30 Nov 2022 23:10:54 +0000</pubDate>
				<category><![CDATA[Easy Difficulty]]></category>
		<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[double jumping]]></category>
		<category><![CDATA[easy]]></category>
		<category><![CDATA[easy difficulty]]></category>
		<category><![CDATA[gameplay features]]></category>
		<category><![CDATA[how to add double jumping to ue5]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 double jump]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 double jumping]]></category>
		<category><![CDATA[unreal engine double jump]]></category>
		<category><![CDATA[unreal engine double jumping]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1841</guid>

					<description><![CDATA[<p>Double jumping is extremely common in retro and modern gaming. Games such as Castlevania Symphony of the Night, Crash Bandicoot, the Kirby&#160;series, Banjo-Kazooie, and more <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-add-double-jumping-in-unreal-engine-5/" title="How to add Double Jumping in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-add-double-jumping-in-unreal-engine-5/">How to add Double Jumping in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Double jumping is extremely common in retro and modern gaming. Games such as Castlevania Symphony of the Night, Crash Bandicoot, the Kirby&nbsp;series, Banjo-Kazooie, and more have platforming elements that require the use of the double jump to complete. <br><br><strong>Luckily, Unreal Engine 5 makes this incredibly easy to achieve!<br></strong><br>In this guide we will be showing you how to add Double Jumping in Unreal Engine 5.<br><br><strong>We will also be showing some intermediate difficulty animation improvements that you can make to your project to make the animations feel better during the double jump!</strong></p>



<h2 class="wp-block-heading">Before we Start</h2>



<p>To make this guide easier to understand for new developers, we are using the Unreal Engine 5 Third Person template which is found in the New Project window.<br><br>If you already have your project setup with a Character blueprint, skip to the &#8220;Adding our Double Jump&#8221; section below.</p>



<h3 class="wp-block-heading">Creating our template project</h3>



<p>Firstly, we want to click Third Person, choose a project location on your computer in the bottom left, then give the project a name in the bottom right. Once this is done, click the blue &#8220;Create&#8221; button in the bottom right of the window.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="662" src="https://couchlearn.com/wp-content/uploads/2022/11/image-20-1024x662.png" alt="Creating a new Third Person project" class="wp-image-1843" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-20-1024x662.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-20-300x194.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-20-768x496.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-20.png 1196w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Once the Unreal Engine editor has opened your new project, open the &#8220;Content Drawer&#8221; in the bottom left of the editor and find the BP_ThirdPersonCharacter object in the Content/ThirdPerson/Blueprints folder.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="903" height="1024" src="https://couchlearn.com/wp-content/uploads/2022/11/image-22-903x1024.png" alt="Opening the Third Person character asset in the Unreal Engine 5 editor's content drawer" class="wp-image-1845" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-22-903x1024.png 903w, https://couchlearn.com/wp-content/uploads/2022/11/image-22-264x300.png 264w, https://couchlearn.com/wp-content/uploads/2022/11/image-22-768x871.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-22.png 922w" sizes="(max-width: 903px) 100vw, 903px" /></figure>



<h2 class="wp-block-heading">Adding our Double Jump</h2>



<p>The first step to add double jump functionality is to open our Character blueprint and select the name.<br><br>In our case this is the text labelled &#8220;BP_ThirdPersonCharacter (Self)&#8221;. Once this is selected the text will go blue as shown below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1007" height="711" src="https://couchlearn.com/wp-content/uploads/2022/11/image-23.png" alt="Selecting the blueprint class in the blueprint editor" class="wp-image-1846" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-23.png 1007w, https://couchlearn.com/wp-content/uploads/2022/11/image-23-300x212.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-23-768x542.png 768w" sizes="(max-width: 1007px) 100vw, 1007px" /></figure>



<p>On the right side of the blueprint editor you will find the &#8220;Details&#8221; tab. Look through the details tab until you find &#8220;Character&#8221; and the &#8220;Jump Max Count&#8221;. This value is set to 1 by default.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1003" height="651" src="https://couchlearn.com/wp-content/uploads/2022/11/image-24.png" alt="Finding the character and jump parameters in the blueprint editor" class="wp-image-1847" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-24.png 1003w, https://couchlearn.com/wp-content/uploads/2022/11/image-24-300x195.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-24-768x498.png 768w" sizes="(max-width: 1003px) 100vw, 1003px" /></figure>



<p>Now as we want to have our character double jump, change this value to 2. If you require more than 2 jumps for your character, change this value to whichever suits your needs.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="689" height="321" src="https://couchlearn.com/wp-content/uploads/2022/11/image-25.png" alt="Change the Jump Max Count from 1 to 2" class="wp-image-1848" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-25.png 689w, https://couchlearn.com/wp-content/uploads/2022/11/image-25-300x140.png 300w" sizes="(max-width: 689px) 100vw, 689px" /></figure>



<p>Once this is done, remember to click the &#8220;Compile&#8221; and &#8220;Save&#8221; buttons in the top left of the blueprint editor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="518" height="254" src="https://couchlearn.com/wp-content/uploads/2022/11/image-26.png" alt="Compiling and saving the blueprint class" class="wp-image-1849" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-26.png 518w, https://couchlearn.com/wp-content/uploads/2022/11/image-26-300x147.png 300w" sizes="(max-width: 518px) 100vw, 518px" /></figure>



<h3 class="wp-block-heading">Simple Double Jump Demo</h3>



<p>Your character is now able to double jump! As you can see in the demo video below the character is double jumping successfully.<br><br>However, one problem you can see is the animation only plays once. In the next section we will be fixing the animations so they play correctly for all jumps. </p>



<figure class="wp-block-video"><video autoplay loop muted src="https://couchlearn.com/wp-content/uploads/2022/11/DoubleJumpSimple.mp4"></video></figure>



<h2 class="wp-block-heading">Animation Improvements (Intermediate Difficulty)</h2>



<p>As the double jump doesn&#8217;t look right in the previous demo, we now are fixing the animations.<br><br>Firstly, open the &#8220;Content Drawer&#8221; and find the ABP_Manny object in the Content/Characters/Mannequins/Animations folder.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="782" src="https://couchlearn.com/wp-content/uploads/2022/11/image-27-1024x782.png" alt="Finding and opening the ABP_Manny animation blueprint file" class="wp-image-1852" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-27-1024x782.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-27-300x229.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-27-768x587.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-27-80x60.png 80w, https://couchlearn.com/wp-content/uploads/2022/11/image-27.png 1364w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Now the animation blueprint editor is open, find and double click the AnimGraph text in the left of the editor window.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="789" height="837" src="https://couchlearn.com/wp-content/uploads/2022/11/image-28.png" alt="Opening the animation blueprint's anim graph" class="wp-image-1853" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-28.png 789w, https://couchlearn.com/wp-content/uploads/2022/11/image-28-283x300.png 283w, https://couchlearn.com/wp-content/uploads/2022/11/image-28-768x815.png 768w" sizes="(max-width: 789px) 100vw, 789px" /></figure>



<p>Next, with the animation graph now open, click the &#8220;Main States&#8221; state machine. This is where all of the animation transitions are held for our character.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="590" src="https://couchlearn.com/wp-content/uploads/2022/11/image-29-1024x590.png" alt="Opening the Main States state machine" class="wp-image-1854" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-29-1024x590.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-29-300x173.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-29-768x442.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-29.png 1426w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Inside the Main States state machine, drag from the state named &#8220;Fall Loop&#8221; to the state named &#8220;Jump&#8221; as shown in the image below. If done correctly you should see an arrow and text stating &#8220;Create a transition&#8221;.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="415" src="https://couchlearn.com/wp-content/uploads/2022/11/image-30-1024x415.png" alt="Creating a new transition between fall loop and jump states" class="wp-image-1856" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-30-1024x415.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-30-300x122.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-30-768x311.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-30.png 1493w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>With our transition now created, click the icon to open the transition editor.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="435" src="https://couchlearn.com/wp-content/uploads/2022/11/image-31-1024x435.png" alt="Opening the newly created animation state transition" class="wp-image-1857" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-31-1024x435.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-31-300x128.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-31-768x327.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-31-1030x438.png 1030w, https://couchlearn.com/wp-content/uploads/2022/11/image-31.png 1385w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Finally, in the transition editor add the blueprint nodes shown in the example image below.<br><br><strong>These nodes allow the animation state to return back to the jumping animation once you trigger the double jump.</strong></p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="561" src="https://couchlearn.com/wp-content/uploads/2022/11/image-32-1024x561.png" alt="Adding the required blueprint nodes to transition back to jump when double jumping" class="wp-image-1858" srcset="https://couchlearn.com/wp-content/uploads/2022/11/image-32-1024x561.png 1024w, https://couchlearn.com/wp-content/uploads/2022/11/image-32-300x164.png 300w, https://couchlearn.com/wp-content/uploads/2022/11/image-32-768x421.png 768w, https://couchlearn.com/wp-content/uploads/2022/11/image-32.png 1271w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Advanced Animated Double Jump Demo</h3>



<p>Your improved double jump is now<strong> complete</strong>! As you can see in the video below, the animations are much better and the player now gets visual feedback when they double jump.</p>



<figure class="wp-block-video"><video autoplay loop muted src="https://couchlearn.com/wp-content/uploads/2022/11/DoubleJumpAdvanced.mp4"></video></figure>



<h2 class="wp-block-heading">Download the Project Files</h2>



<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://gumroad.com/l/uaahv">Loading&#8230;</a></div>



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



<p>Your Unreal Engine 5 project now has a double jump capable character! For a challenge, do try to follow the optional animation improvement steps as it really make a difference to the experience!</p>



<p>Further Reading:<br><a href="https://docs.unrealengine.com/5.0/en-US/setting-up-a-character-in-unreal-engine/" target="_blank" rel="noreferrer noopener">Official blueprint guide to setting up a new character mesh in UE5<br></a><a href="https://docs.unrealengine.com/4.26/en-US/API/Runtime/Engine/GameFramework/ACharacter/" target="_blank" rel="noreferrer noopener">Full ACharacter documentation for advanced jump settings in C++</a></p>
<p>The post <a href="https://couchlearn.com/how-to-add-double-jumping-in-unreal-engine-5/">How to add Double Jumping in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://couchlearn.com/how-to-add-double-jumping-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		<enclosure url="https://couchlearn.com/wp-content/uploads/2022/11/DoubleJumpSimple.mp4" length="806447" type="video/mp4" />
<enclosure url="https://couchlearn.com/wp-content/uploads/2022/11/DoubleJumpAdvanced.mp4" length="855661" type="video/mp4" />

			</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-07 04:41:23 by W3 Total Cache
-->