Home How To: Quickly Integrate Steam with Unreal Engine 5
Post
Cancel

How To: Quickly Integrate Steam with Unreal Engine 5

Basic Steps to Integrate Steam with UE5

  1. Enable OnlineSubsystemSteam Plugin
  2. Enable SteamSockets Plugin
  3. Use the default UE5 Find / Create / Destroy Session Nodes.

Enabling OnlineSubsystemSteam

Add the following to the end of the /Config/DefaultEngine.ini config:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
[/Script/Engine.GameEngine]
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")

[OnlineSubsystem]
DefaultPlatformService=Steam

[OnlineSubsystemSteam]
bEnabled=true
SteamDevAppId=480
; If using Sessions
bInitServerOnClient=true

[/Script/OnlineSubsystemSteam.SteamNetDriver]
NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"

This will set up steam appropriately and ensure you can create joinable lobbies from the client.

Enabling SteamSockets

From your project folder, you’ll need to create a custom config folder for the Windows platform. The path should be /Config/Windows/WindowsEngine.ini, the contents of the file are pretty basic:

1
2
3
[/Script/Engine.GameEngine]
!NetDriverDefinitions=ClearArray
+NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="/Script/SteamSockets.SteamSocketsNetDriver",DriverClassNameFallback="/Script/SteamSockets.SteamNetSocketsNetDriver")

This will ensure that we replace the NetDriver, but only on the Windows platform. Otherwise we’ll run in to multiplayer errors on mobile and oculus multiplayer.

At this point you should be able to call Create Session and Find Session from blueprint. Once a steam player has created a session, other players can join them by right clicking the friend’s list and choosing “Join Lobby”.

This post is licensed under CC BY 4.0 by the author.