在Unity中,如何构建和播放WebGL项目并在Android设备上播放?(In Unity, how to build and play a WebGL project and play it on

编程入门 行业动态 更新时间:2024-10-24 00:21:36
在Unity中,如何构建和播放WebGL项目并在Android设备上播放?(In Unity, how to build and play a WebGL project and play it on an Android device?)

我正在尝试为Android和iOS设备构建一个WebGL Unity游戏,但我不确定如何。 我可以在PC上运行游戏,因为Build Settings中的Build&Play选项会自动为我完成。 但是如果我想在Android设备上玩游戏呢?

为了澄清,我不打算创建一个Android版本(即一个APK文件)。 我正在尝试创建一个WebGL构建并在Android设备的Web浏览器上测试这个WebGL构建。

I'm trying to build a WebGL Unity game for Android and iOS devices but I'm not sure how. I can run the game fine on PC because the Build & Play option from the Build Settings does this automatically for me. But what if I want to playtest the game on an Android device?

For clarification, I am not looking to create an Android build (i.e. an APK file). I'm attempting to create a WebGL build and playtest this WebGL build on an Android device's web browser.

最满意答案

要在Windows中的移动设备上使用WebGL导出,请安装IIS。 在Linux中,使用Apache创建Web服务器并将导出的文件夹上载到Web服务器的www根文件夹。 然后在移动浏览器中调用您的ip:port / yourSiteName

请查看此链接,了解在IIS中上传的演练

For using WebGL export on mobile devices in windows, install IIS. In Linux, use Apache to create a web server and upload the exported folder to the www root folder of the web server. Then call your ip:port/yourSiteName in a mobile browser.

Check this link for a walkthrough of uploading in IIS

更多推荐

本文发布于:2023-04-27 14:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1327185.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:并在   项目   设备   Unity   WebGL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!