<?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>C++ Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/category/unreal-engine/c/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/category/unreal-engine/c/</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>C++ Archives - Couch Learn</title>
	<link>https://couchlearn.com/category/unreal-engine/c/</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 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>
	</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-15 17:12:11 by W3 Total Cache
-->