<?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>multiplayer sessions Archives - Couch Learn</title>
	<atom:link href="https://couchlearn.com/tag/multiplayer-sessions/feed/" rel="self" type="application/rss+xml" />
	<link>https://couchlearn.com/tag/multiplayer-sessions/</link>
	<description>Detailed Game Programming Tutorials</description>
	<lastBuildDate>Sun, 14 Aug 2022 21:53:20 +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>multiplayer sessions Archives - Couch Learn</title>
	<link>https://couchlearn.com/tag/multiplayer-sessions/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to use Multiplayer Sessions in Unreal Engine 5</title>
		<link>https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/</link>
					<comments>https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/#comments</comments>
		
		<dc:creator><![CDATA[Matt]]></dc:creator>
		<pubDate>Sun, 14 Aug 2022 21:53:18 +0000</pubDate>
				<category><![CDATA[Medium Difficulty]]></category>
		<category><![CDATA[Multiplayer]]></category>
		<category><![CDATA[Unreal Engine]]></category>
		<category><![CDATA[Unreal Engine 5]]></category>
		<category><![CDATA[multiplayer sessions]]></category>
		<category><![CDATA[ue5]]></category>
		<category><![CDATA[ue5 multiplayer]]></category>
		<category><![CDATA[ue5 sessions]]></category>
		<category><![CDATA[unreal engine]]></category>
		<category><![CDATA[unreal engine 5]]></category>
		<category><![CDATA[unreal engine 5 multiplayer]]></category>
		<category><![CDATA[unreal engine 5 sessions]]></category>
		<guid isPermaLink="false">https://couchlearn.com/?p=1684</guid>

					<description><![CDATA[<p>Utilizing Multiplayer Sessions in Unreal Engine 5 allows customization of your multiplayer session settings such as player limits, public, and private slots. You also get <a class="mh-excerpt-more" href="https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/" title="How to use Multiplayer Sessions in Unreal Engine 5">[...]</a></p>
<p>The post <a href="https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/">How to use Multiplayer Sessions in Unreal Engine 5</a> appeared first on <a href="https://couchlearn.com">Couch Learn</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Utilizing Multiplayer Sessions in Unreal Engine 5 allows customization of your multiplayer session settings such as player limits, public, and private slots. You also get access to the server browser to view all the active game sessions.<br><br>Unreal Engine 5 has many built in blueprint nodes to make this process really easy!<br><br>In this guide we will be setting up a basic multiplayer game using sessions in Unreal Engine 5. Players will be able to setup a session that others can join through a menu.</p>



<h3 class="wp-block-heading">Online and LAN Support</h3>



<p>Unreal Engine 5&#8217;s NULL online subsystem can not find sessions outside of the player&#8217;s local network.<br><br>To find and connect to sessions outside of your local network without a direct IP address connection you <strong>need to use a different online subsystem</strong> such as <strong>Steam</strong>.<br><br><a href="https://docs.unrealengine.com/en-US/Programming/Online/Steam/index.html"><em>Click here to read the documentation for the Steam subsystem</em></a></p>



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



<h3 class="wp-block-heading">Creating the Widget Blueprint</h3>



<p>To allow our players to create their own sessions and join others we need to create buttons and text on screen. In Unreal Engine 5 this is called a user interface <strong>widget</strong>.</p>



<p>Firstly, right click in the content drawer and create a Widget Blueprint</p>



<figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="1024" height="824" src="https://couchlearn.com/wp-content/uploads/2022/08/image-17-1024x824.png" alt="Creating the sessions widget blueprint" class="wp-image-1689" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-17-1024x824.png 1024w, https://couchlearn.com/wp-content/uploads/2022/08/image-17-300x241.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-17-768x618.png 768w, https://couchlearn.com/wp-content/uploads/2022/08/image-17.png 1176w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<p>Click &#8220;User Widget&#8221; in the menu that pops up.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="777" height="289" src="https://couchlearn.com/wp-content/uploads/2022/08/image-18.png" alt="Creating the widget from the user widget base blueprint" class="wp-image-1690" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-18.png 777w, https://couchlearn.com/wp-content/uploads/2022/08/image-18-300x112.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-18-768x286.png 768w" sizes="(max-width: 777px) 100vw, 777px" /></figure>



<p>Now we have to name our widget blueprint. For this guide we named the blueprint &#8220;Session Widget&#8221;. You can name your widget blueprint anything you like but make sure to remember the name for a later step!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="599" height="271" src="https://couchlearn.com/wp-content/uploads/2022/08/image-19.png" alt="Naming our widget Session Widget" class="wp-image-1691" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-19.png 599w, https://couchlearn.com/wp-content/uploads/2022/08/image-19-300x136.png 300w" sizes="(max-width: 599px) 100vw, 599px" /></figure>



<p>Finally, double click your widget blueprint and you will see the Widget Designer window.</p>



<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="549" src="https://couchlearn.com/wp-content/uploads/2022/08/image-20-1024x549.png" alt="Blueprint Designer window" class="wp-image-1692" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-20-1024x549.png 1024w, https://couchlearn.com/wp-content/uploads/2022/08/image-20-300x161.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-20-768x412.png 768w, https://couchlearn.com/wp-content/uploads/2022/08/image-20-1536x824.png 1536w, https://couchlearn.com/wp-content/uploads/2022/08/image-20.png 1893w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<h3 class="wp-block-heading">Designing our Widget</h3>



<p>When designing widgets, you can find all available widget elements in the left side Palette menu.<br><br>To start designing your session widget, simply search for Canvas Panel and drag it into the middle section of the window.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="354" height="276" src="https://couchlearn.com/wp-content/uploads/2022/08/image-21.png" alt="Adding the canvas panel" class="wp-image-1693" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-21.png 354w, https://couchlearn.com/wp-content/uploads/2022/08/image-21-300x234.png 300w" sizes="(max-width: 354px) 100vw, 354px" /></figure>



<p>Next, search for Vertical Box and drag it into the middle section of the window. These layout elements will be the main structure of your widget.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="322" height="224" src="https://couchlearn.com/wp-content/uploads/2022/08/image-22.png" alt="Adding the vertical box" class="wp-image-1694" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-22.png 322w, https://couchlearn.com/wp-content/uploads/2022/08/image-22-300x209.png 300w" sizes="(max-width: 322px) 100vw, 322px" /></figure>



<p>From there find the details panel on the right side of the window. Click Anchors and select the center box option shown in the image below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="479" height="525" src="https://couchlearn.com/wp-content/uploads/2022/08/image-23.png" alt="Setting the widget anchor to center" class="wp-image-1695" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-23.png 479w, https://couchlearn.com/wp-content/uploads/2022/08/image-23-274x300.png 274w" sizes="(max-width: 479px) 100vw, 479px" /></figure>



<p>After setting the anchors correctly we can begin to set the size and position of our widget.<br><br>Below the anchors drop down, set Position X, Position Y, Size X, and Size Y to the values shown in the image below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="463" height="307" src="https://couchlearn.com/wp-content/uploads/2022/08/image-24.png" alt="Setting the position and size" class="wp-image-1696" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-24.png 463w, https://couchlearn.com/wp-content/uploads/2022/08/image-24-300x199.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></figure>



<p>Now, in the Palette menu, create two buttons. These will be interactable by the user to create and join multiplayer game sessions.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="291" height="151" src="https://couchlearn.com/wp-content/uploads/2022/08/image-25.png" alt="Adding two buttons" class="wp-image-1697"/></figure>



<p>So we can access the buttons in the next step, click the first button and change the name in the details panel to CreateSession. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="326" height="68" src="https://couchlearn.com/wp-content/uploads/2022/08/image-26.png" alt="Naming the Create session button" class="wp-image-1698" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-26.png 326w, https://couchlearn.com/wp-content/uploads/2022/08/image-26-300x63.png 300w" sizes="(max-width: 326px) 100vw, 326px" /></figure>



<p>Repeat this for the next button and name it JoinSession.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="330" height="76" src="https://couchlearn.com/wp-content/uploads/2022/08/image-27.png" alt="Naming the Join session button" class="wp-image-1699" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-27.png 330w, https://couchlearn.com/wp-content/uploads/2022/08/image-27-300x69.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-27-326x76.png 326w" sizes="(max-width: 330px) 100vw, 330px" /></figure>



<p>To show to the user which button is used for creating and joining we need to add text to the buttons.<br><br>In the Palette menu search Text and drag the text onto the button. As you can see the text appears on the button and automatically resizes it so it fits well.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="491" height="309" src="https://couchlearn.com/wp-content/uploads/2022/08/dragtexttobutton.gif" alt="Adding text to the buttons" class="wp-image-1701"/></figure>



<p>After creating one text element for each button, change the Text value for each Text element in the right side Details panel.<br><br>Set the top button to Create Session and the second button to Join Session.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="476" height="371" src="https://couchlearn.com/wp-content/uploads/2022/08/image-56.png" alt="Setting the Text value" class="wp-image-1731" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-56.png 476w, https://couchlearn.com/wp-content/uploads/2022/08/image-56-300x234.png 300w" sizes="(max-width: 476px) 100vw, 476px" /></figure>



<p>Now to improve the design of our buttons, select both buttons and in the right side Details panel set Padding to 15 and click Fill.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="468" height="259" src="https://couchlearn.com/wp-content/uploads/2022/08/image-30.png" alt="Setting the padding and fill" class="wp-image-1703" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-30.png 468w, https://couchlearn.com/wp-content/uploads/2022/08/image-30-300x166.png 300w" sizes="(max-width: 468px) 100vw, 468px" /></figure>



<p>Now our widget buttons are neatly arranged and easy for the players to use.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="410" height="529" src="https://couchlearn.com/wp-content/uploads/2022/08/image-31.png" alt="Two buttons in the correct layout" class="wp-image-1704" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-31.png 410w, https://couchlearn.com/wp-content/uploads/2022/08/image-31-233x300.png 233w" sizes="(max-width: 410px) 100vw, 410px" /></figure>



<p>Once you are done customizing your widget, click Compile and Save to ensure your changes are applied.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="430" height="243" src="https://couchlearn.com/wp-content/uploads/2022/08/image-32.png" alt="Compile and saving the widget" class="wp-image-1705" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-32.png 430w, https://couchlearn.com/wp-content/uploads/2022/08/image-32-300x170.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></figure>



<p>Finally, click the Graph button on the top right side. This will switch the Widget Designer to the Widget Blueprint editor ready to give functionality to your widget!</p>



<figure class="wp-block-image size-full"><img decoding="async" width="306" height="204" src="https://couchlearn.com/wp-content/uploads/2022/08/image-33.png" alt="Switching to the widget blueprint graph" class="wp-image-1706" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-33.png 306w, https://couchlearn.com/wp-content/uploads/2022/08/image-33-300x200.png 300w" sizes="(max-width: 306px) 100vw, 306px" /></figure>



<h2 class="wp-block-heading">Hosting and Joining a Multiplayer Session</h2>



<h3 class="wp-block-heading">Creating and Hosting our Game Session</h3>



<p>Now that we are in the Widget Blueprint editor, you should see your two buttons in the Variables section on the left.<br><br>Click the first button in the list.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="347" height="390" src="https://couchlearn.com/wp-content/uploads/2022/08/image-34.png" alt="Selecting the CreateSession button" class="wp-image-1707" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-34.png 347w, https://couchlearn.com/wp-content/uploads/2022/08/image-34-267x300.png 267w" sizes="(max-width: 347px) 100vw, 347px" /></figure>



<p>Below you should now see a Details menu with all of the events available to your button.<br><br>We need On Clicked so click the big green box with the plus icon inside to add this event.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="343" height="412" src="https://couchlearn.com/wp-content/uploads/2022/08/image-35.png" alt="Adding the On Clicked button event" class="wp-image-1708" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-35.png 343w, https://couchlearn.com/wp-content/uploads/2022/08/image-35-250x300.png 250w" sizes="(max-width: 343px) 100vw, 343px" /></figure>



<p>You should now see the On Clicked event for your button in the middle editor window.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="303" height="124" src="https://couchlearn.com/wp-content/uploads/2022/08/image-36.png" alt="On Clicked button event" class="wp-image-1709" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-36.png 303w, https://couchlearn.com/wp-content/uploads/2022/08/image-36-300x123.png 300w" sizes="(max-width: 303px) 100vw, 303px" /></figure>



<p>Right click anywhere and type Create Session. Click the option in the menu that shows Create Session.<br><br>Now connect the nodes together using the white arrows as shown below.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="584" height="206" src="https://couchlearn.com/wp-content/uploads/2022/08/image-37.png" alt="Creating the session node" class="wp-image-1710" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-37.png 584w, https://couchlearn.com/wp-content/uploads/2022/08/image-37-300x106.png 300w" sizes="(max-width: 584px) 100vw, 584px" /></figure>



<p>Right click anywhere and type Get Player Controller. Click the option in the menu and connect this to the blue pin. <br><br>After the blue pin is connected, set the Public Connections number to the maximum amount of players you want per game session.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="624" height="222" src="https://couchlearn.com/wp-content/uploads/2022/08/image-38.png" alt="Connecting the player controller and setting the maximum connections to the server" class="wp-image-1711" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-38.png 624w, https://couchlearn.com/wp-content/uploads/2022/08/image-38-300x107.png 300w" sizes="(max-width: 624px) 100vw, 624px" /><figcaption><strong><em>If “Use Lan” is checked the session you create will be only available on your local internet.</em></strong></figcaption></figure>



<h3 class="wp-block-heading">Opening Levels to Multiplayer</h3>



<p>Right click anywhere, type and select the Open Level option and connect this node to the On Success pin.<br><br>To create a multiplayer game using your level, set the “Level Name” pin to the level you wish to play on. In our case, this is FirstPersonExampleMap.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="984" height="218" src="https://couchlearn.com/wp-content/uploads/2022/08/image-39.png" alt="Opening the level the server will use for gameplay" class="wp-image-1712" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-39.png 984w, https://couchlearn.com/wp-content/uploads/2022/08/image-39-300x66.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-39-768x170.png 768w" sizes="(max-width: 984px) 100vw, 984px" /></figure>



<p>Lastly, click the drop down arrow and into the Options text box type:</p>



<pre class="wp-block-code"><code>?listen</code></pre>



<p>With these steps complete, the code should look like this.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="857" height="230" src="https://couchlearn.com/wp-content/uploads/2022/08/image-40.png" alt="Configuring the level as a listen server" class="wp-image-1713" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-40.png 857w, https://couchlearn.com/wp-content/uploads/2022/08/image-40-300x81.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-40-768x206.png 768w" sizes="(max-width: 857px) 100vw, 857px" /></figure>



<p>This code sets the level up to listen for multiplayer connections as a Listen Server.</p>



<h2 class="wp-block-heading">Connecting to your Multiplayer Session</h2>



<h3 class="wp-block-heading">Finding Sessions</h3>



<p>Finding multiplayer sessions using Unreal Engine 5 blueprints is incredibly simple. <br><br>The Find Sessions node searches and finds the active game sessions for your players to join. It outputs different execution pins based on if it succeeded or failed. The session results are returned as an array.</p>



<p>If you aren’t familiar with arrays <a href="https://couchlearn.com/how-to-use-loops-and-arrays-unreal-engine-4/">click here to learn about arrays in Unreal Engine.</a></p>



<p>Firstly, we need to create the On Clicked button event for our JoinSession button, as we did in the previous step.<br><br>From there, right click and create the Find Sessions and Get Player Controller nodes. Connect this node to the On Clicked event, connect the Get Player Controller node to the blue pin, and set Max Results to 100.<br><br>Max results is the amount of sessions it will try to find.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="567" height="190" src="https://couchlearn.com/wp-content/uploads/2022/08/image-41.png" alt="Adding the find sessions node" class="wp-image-1714" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-41.png 567w, https://couchlearn.com/wp-content/uploads/2022/08/image-41-300x101.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></figure>



<h3 class="wp-block-heading">Joining the Session</h3>



<p>Next, we need to create the Join session node and another Get Player Controller node. We could reuse the previous node but it makes the blueprints easier to read.<br><br>The Join Session node should be connected to the On Success pin on the Find Session node.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="871" height="233" src="https://couchlearn.com/wp-content/uploads/2022/08/image-42.png" alt="Adding and connecting the join session node" class="wp-image-1715" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-42.png 871w, https://couchlearn.com/wp-content/uploads/2022/08/image-42-300x80.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-42-768x205.png 768w" sizes="(max-width: 871px) 100vw, 871px" /></figure>



<p>From the Results square pin, drag and let go to open the blueprint node menu. We can then type get and create a Get (a copy) node. </p>



<figure class="wp-block-image size-full"><img decoding="async" width="744" height="466" src="https://couchlearn.com/wp-content/uploads/2022/08/image-43.png" alt="Getting an array element from the Results array" class="wp-image-1716" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-43.png 744w, https://couchlearn.com/wp-content/uploads/2022/08/image-43-300x188.png 300w" sizes="(max-width: 744px) 100vw, 744px" /></figure>



<p>Finally, connect the Dark blue pin of the Get node and connect this to the Search Result input node.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="862" height="333" src="https://couchlearn.com/wp-content/uploads/2022/08/image-44.png" alt="Connecting the result array element to the join session node" class="wp-image-1717" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-44.png 862w, https://couchlearn.com/wp-content/uploads/2022/08/image-44-300x116.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-44-768x297.png 768w" sizes="(max-width: 862px) 100vw, 862px" /><figcaption>Your hosting and joining blueprints are now complete!</figcaption></figure>



<h3 class="wp-block-heading">Adding our Widget to the Screen</h3>



<p>To make our widget show on the screen, firstly click the branch icon in the main editor window shown below.<br><br>In the drop down menu click Open Level Blueprint to open the Level Blueprint Editor.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="928" height="448" src="https://couchlearn.com/wp-content/uploads/2022/08/image-46.png" alt="Opening the level blueprint editor" class="wp-image-1719" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-46.png 928w, https://couchlearn.com/wp-content/uploads/2022/08/image-46-300x145.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-46-768x371.png 768w" sizes="(max-width: 928px) 100vw, 928px" /></figure>



<p>Right click anywhere and create the Event Begin Play and Create Widget blueprint nodes.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="410" height="114" src="https://couchlearn.com/wp-content/uploads/2022/08/image-49.png" alt="Creating the create widget node" class="wp-image-1722" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-49.png 410w, https://couchlearn.com/wp-content/uploads/2022/08/image-49-300x83.png 300w" sizes="(max-width: 410px) 100vw, 410px" /></figure>



<p>Connect the white pins together and select your widget in the Class drop down box.<br><br>In our case we named the widget SessionWidget to make it easy to find in the drop down box.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="621" height="313" src="https://couchlearn.com/wp-content/uploads/2022/08/image-48.png" alt="Setting the widget class to spawn to SessionWidget created earlier" class="wp-image-1721" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-48.png 621w, https://couchlearn.com/wp-content/uploads/2022/08/image-48-300x151.png 300w" sizes="(max-width: 621px) 100vw, 621px" /></figure>



<p>Lastly, create an Add to Viewport blueprint node and connect the blue pins together. This will create our widget and then add to the game screen.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="755" height="194" src="https://couchlearn.com/wp-content/uploads/2022/08/image-50.png" alt="Adding the newly spawned widget to the game viewport" class="wp-image-1723" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-50.png 755w, https://couchlearn.com/wp-content/uploads/2022/08/image-50-300x77.png 300w" sizes="(max-width: 755px) 100vw, 755px" /></figure>



<p>The final level blueprint should look like this.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="751" height="206" src="https://couchlearn.com/wp-content/uploads/2022/08/image-51.png" alt="Finished level blueprint" class="wp-image-1724" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-51.png 751w, https://couchlearn.com/wp-content/uploads/2022/08/image-51-300x82.png 300w" sizes="(max-width: 751px) 100vw, 751px" /></figure>



<h3 class="wp-block-heading">Opening the Game Clients</h3>



<p>For the last step we need to test our blueprint logic!<br><br>Unreal Engine 5 makes testing multiplayer in the editor extremely simple.<br><br>First, click the three dot button and, in the drop down menu, set Number of Players to 2. After that click New Editor Window to launch two windows of your game.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="801" height="533" src="https://couchlearn.com/wp-content/uploads/2022/08/image-55.png" alt="Opening two game clients in the Unreal Engine 5 editor" class="wp-image-1728" srcset="https://couchlearn.com/wp-content/uploads/2022/08/image-55.png 801w, https://couchlearn.com/wp-content/uploads/2022/08/image-55-300x200.png 300w, https://couchlearn.com/wp-content/uploads/2022/08/image-55-768x511.png 768w" sizes="(max-width: 801px) 100vw, 801px" /></figure>



<p>Once the two clients have loaded, click Create Session on one and Join Session on the other. After a short amount of time they will connect together in a multiplayer session!<br><br>As you can see in the demo below, the players can move around and see each other moving without any additional work! The template character in Unreal Engine 5 have multiplayer movement support out of the box.</p>



<figure class="wp-block-image size-full"><img decoding="async" width="696" height="369" src="https://couchlearn.com/wp-content/uploads/2022/08/multiplayersessionsue5.gif" alt="Demonstration showing multiplayer functionality through Unreal Engine 5 sessions" class="wp-image-1729"/></figure>



<h3 class="wp-block-heading">Connecting to Sessions Outside your Local Internet Network</h3>



<p>The session and listen server created in this guide can be connected to inside your local network by default and world wide through the internet with a few additional steps.</p>



<p>If you wish to host your session to global internet users, you need to <strong>port forward</strong> UDP/TCP 7777. Setting up port forwarding is different per router so check your specific router instructions.</p>



<p><a href="https://en.wikipedia.org/wiki/Port_forwarding">If you don’t know what port forwarding is click here.</a></p>



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



<p>We create these free guides and resources on Game Development to give anyone the knowledge to make their own games. If you find these guides helpful please consider supporting us by purchasing our project files.<br><br><strong>To improve your multiplayer sessions gameplay, we have bundled a session browser into the project files!</strong></p>



<div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex">
<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://couchlearn.gumroad.com/l/ipoxq">Loading&#8230;</a></div>
</div>



<div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow">
<script src="https://gumroad.com/js/gumroad-embed.js"></script>
<div class="gumroad-product-embed"><a href="https://couchlearn.gumroad.com/l/mmshe">Loading&#8230;</a></div>
</div>
</div>



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



<p>Your project can now create and join multiplayer sessions!</p>



<p>This guide was created to make the initial multiplayer setup as easy as possible. Unreal Engine 5 has extremely robust and powerful multiplayer tools to make any multiplayer game you want!</p>



<p>To learn more about replication and the session system, the Unreal Engine documentation is the best place to improve your knowledge about multiplayer development.</p>



<p><a href="https://wiki.unrealengine.com/Replication">Click here to read more about Replication.</a></p>



<p><a href="https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/OnlineNodes/index.html">Clic</a><a href="https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/OnlineNodes/index.html"></a><a href="https://docs.unrealengine.com/en-US/Engine/Blueprints/UserGuide/OnlineNodes/index.html">k here to read more about the session system nodes.</a></p>
<p>The post <a href="https://couchlearn.com/how-to-use-multiplayer-sessions-in-unreal-engine-5/">How to use Multiplayer Sessions 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-use-multiplayer-sessions-in-unreal-engine-5/feed/</wfw:commentRss>
			<slash:comments>3</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:15:18 by W3 Total Cache
-->