unrealengine开启像素流笔记
简书链接:unrealengine开启像素流笔记
文章字数:806,阅读全文大约需要3分钟
本教程忽略了一些细节,但是不重要,需要详细教程参考
https://docs.unrealengine.com/5.2/zh-CN/getting-started-with-pixel-streaming-in-unreal-engine/
1.启用像素流插件Pixel Streaming
2.编辑器偏好设置
关卡编辑器-播放添加额外启动参数
-AudioMixer -PixelStreamingIP=localhost -PixelStreamingPort=8888
对于打包的参数,玩法和其他的类似。
3.(先确保安装了node.js)
进入D:\MyEpic\Epic Games\UE_5.2\Engine\Plugins\Media\PixelStreaming\Resources\WebServers
打开get_ps_server.bat下载SignallingWebServer
或者直接下载到本地git clone --branch UE5.2 https://github.com/EpicGames/PixelStreamingInfrastructure.git
然后打开里面的SignallingWebServer
因为,上面这个文件的方法进行下载多次执行反而会导致删文件,无语死了
再打开
1 | 原理是: |
pushd %~dp0....
call platform_scripts\cmd\node\npm install –no-save
1 | 可以手动在package.json目录输入```>npm install --registry=https://registry.npm.taobao.org``` |
Running: platform_scripts\cmd\node\node.exe cirrus –peerConnectionOptions=”{ "iceServers": [{"urls": ["stun:stun.l.google.com:19302"]}] }” –PublicIp=219.133.101.191
10:18:13.662 configFile D:\UnrealProjects\PixelStreamingInfrastructure\SignallingWebServer\config.json
10:18:13.682 Config file is readonly, skipping writing config…
10:18:13.683 Config: {
“UseFrontend”: false,
“UseMatchmaker”: false,
“UseHTTPS”: false,
“HTTPSCertFile”: “./certificates/client-cert.pem”,
“HTTPSKeyFile”: “./certificates/client-key.pem”,
“UseAuthentication”: false,
“LogToFile”: true,
“LogVerbose”: true,
“HomepageFile”: “player.html”,
“AdditionalRoutes”: {},
“EnableWebserver”: true,
“MatchmakerAddress”: “”,
“MatchmakerPort”: 9999,
“PublicIp”: “219.133.101.191”,
“HttpPort”: 80,
“HttpsPort”: 443,
“StreamerPort”: 8888,
“SFUPort”: 8889,
“MaxPlayerCount”: -1,
“DisableSSLCert”: true,
“peerConnectionOptions”: “{ "iceServers": [{"urls": ["stun:stun.l.google.com:19302"]}] }”
}
1 | 7.修改端口 |
{
“UseFrontend”: false,
“UseMatchmaker”: false,
“UseHTTPS”: false,
“UseAuthentication”: false,
“LogToFile”: true,
“LogVerbose”: true,
“HomepageFile”: “player.html”,
“AdditionalRoutes”: {},
“EnableWebserver”: true,
“MatchmakerAddress”: “”,
“MatchmakerPort”: 9999,
“PublicIp”: “localhost”,
“HttpPort”: 81,
“HttpsPort”: 443,
“StreamerPort”: 8888,
“SFUPort”: 8889,
“MaxPlayerCount”: -1
}
8.用开发工具运行

不过实际上还是执行这些平台脚本,window下没有Start_SignalServer.bat执行后报错。
9.关于在关卡编辑器中测试的办法
直接勾选使用远程信令服务器,然后stream 推送必须选,我这里选择推送关卡编辑器,而非完整关卡编辑器。
测试发现ui不见了,也不能进行交互,因此还是选择完整的吧。
