本教程忽略了一些细节,但是不重要,需要详细教程参考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
因为,上面这个文件的方法进行下载多次执行反而会导致删文件,无语死了
再打开\UE_5.2\Engine\Plugins\Media\PixelStreaming\Resources\WebServers\SignallingWebServer\platform_scripts\setup.bat
下载相关node.js的依赖
原理是:
pushd %~dp0\..\..\
call platform_scripts\cmd\node\npm install --no-save
可以手动在package.json目录输入>npm install --registry=https://registry.npm.taobao.org
第三方镜像有时候垃圾试试npm set registry https://registry.npmjs.org/
官方镜像
4.powershell执行set-executionpolicy remotesigned
打开执行ps1权限,避免提示执行权限错误启动信令服务器
之后powershell 在这个目录执行./Start_SignallingServer.ps1
打开编辑器或者编译好的程序带参数打开应该可以进行测试了。
6.这是参数
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\"]}] }"
}
7.修改端口
在服务器目录打开config.json
{"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不见了,也不能进行交互,因此还是选择完整的吧。
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/21237.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!