UE4聯(lián)網Steam
來源:
52vr |
責任編輯:傳說的落葉 |
發(fā)布時間: 2019-06-11 08:37 | 瀏覽量:
LAN聯(lián)網很簡單相信大家都會了,現在跟大家分享下Steam聯(lián)網的設置
參考:https://wiki.unrealengine.com/Steam,_Using_the_Steam_SDK_During_Development
不過上面是英文版的,以下是我親測可用的:
1.在UE4安裝目錄下 找到 Steamworks文件夾。
我的UE4安裝在D盤Program Files文件夾里,路徑是:
D:\Program Files\Epic Games\4.12\Engine\Source\ThirdParty\Steamworks
各位可以參考下。
2.該文件夾中,新建兩個文件夾,名字分別為:Win64和Win32
新建后效果如圖:
3.在Steam安裝目錄下找到以下dll,復制到對應文件夾。
Win64
steam_api64.dll (Downloaded SDK)
steamclient64.dll (Steam Client Install Dir)
tier0_s64.dll (Steam Client Install Dir)
vstdlib_s64.dll (Steam Client Install Dir)
Win32
steam_api.dll (Downloaded SDK)
steamclient.dll (Steam Client Install Dir)
tier0_s.dll (Steam Client Install Dir)
vstdlib_s.dll (Steam Client Install Dir)
我的Steam安裝在了C盤,各位可以參考并找到自己的安裝路徑
C:\Program Files (x86)\Steam
4.打開你的工程文件的VS
5.在Build.cs中加入以下代碼
[代碼]:
1 |
PublicDependencyModuleNames.AddRange( new string [] { |
2 |
"OnlineSubsystem" , |
3 |
"OnlineSubsystemUtils" |
4 |
}); |
5 |
DynamicallyLoadedModuleNames.Add( "OnlineSubsystemSteam" ); |
6.在Target.cs中的TargetRules中加入一句代碼:bUserSteam = true;
7.在Config文件夾下的DefaultEngine.ini文件中,加入以下代碼:
[代碼]:
01 |
[/Script/Engine.GameEngine] |
02 |
!NetDriverDefinitions=ClearArray |
03 |
+NetDriverDefinitions=(DefName= "GameNetDriver" ,DriverClassName= "/Script/OnlineSubsystemSteam.SteamNetDriver" ,DriverClassNameFallback= "/Script/OnlineSubsystemUtils.IpNetDriver" ) |
04 |
|
05 |
[OnlineSubsystem] |
06 |
DefaultPlatformService=Steam |
07 |
PollingIntervalInMs=20 |
08 |
|
09 |
[OnlineSubsystemSteam] |
10 |
bEnabled= true |
11 |
SteamDevAppId=480 |
12 |
GameServerQueryPort=27015 |
13 |
bRelaunchInSteam= false |
14 |
GameVersion=1.0.0.0 |
15 |
bVACEnabled=1 |
16 |
bAllowP2PPacketRelay= true |
17 |
P2PConnectionTimeout=90 |
18 |
|
19 |
[/Script/OnlineSubsystemSteam.SteamNetDriver] |
20 |
NetConnectionClassName= "/Script/OnlineSubsystemSteam.SteamNetConnection" |
我的路徑是:
D:\test\TestSteam\Config
8.編譯C++代碼,編譯好了以后打包。
9.把UE4源文件里的Engine\Binaries\ThirdParty\Steamworks整個復制到打包好的文件的Binaries\ThirdParty下。
我的路徑是:
D:\Program Files\Epic Games\4.12\Engine\Binaries\ThirdParty\Steamworks 復制到
10.然后就可以運行了,按Shift+Tab 就可以調出Steam的界面!
-
分享到:
相關文章
網友評論
全部評論:0條
推薦
熱門