UE4有了Steam联机插件之后方便了许多
打开项目设置->找到
找到项目里的“DefaultEngine.ini”文件,加上
- [/Script/Engine.GameEngine]
- +NetDriverDefinitions=(DefName="GameNetDriver",DriverClassName="OnlineSubsystemSteam.SteamNetDriver",DriverClassNameFallback="OnlineSubsystemUtils.IpNetDriver")
- [OnlineSubsystem]
- DefaultPlatformService=Steam
- [OnlineSubsystemSteam]
- bEnabled=true
- SteamDevAppId=480
- [/Script/OnlineSubsystemSteam.SteamNetDriver]
- NetConnectionClassName="OnlineSubsystemSteam.SteamNetConnection"
其中SteamDevAppId是你的AppId,如果没有就用480这个测试ID
重启