本文介绍了如何从移动浏览器启动Unity3d应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个电子学习平台,可以启动HTML5或javascript游戏和活动。这些通过JSON中的Web服务调用回传到电子学习平台(调用由javascript函数包装)。

We have an e-learning platform which starts up HTML5 or javascript games and activities. These communicate back to the e-learning platform via web services calls in JSON (calls are wrapped by javascript functions).

我们想集成Unity3d游戏和活动,但不清楚它们如何在Android或iOS环境中启动。我们知道可以使用Unity3d webplayer插件在标准Web浏览器中启动它们。他们还可以与页面进行通信,这对我们来说非常方便 - 类似于javascript元素。

We'd like to integrate Unity3d games and activities, but are not clear on how they could be started in an Android or iOS context. We know they can be started in a standard web browser with the Unity3d webplayer plugin. They can also communicate with the page, which is very convenient for us - resembles a javascript element.

在Android手机或iPad上怎么样?我们的应用程序在这些设备上的移动浏览器中运行我不知道有一个可用于移动浏览器的Unity3d插件。我也不知道从网页上启动应用程序的任何方法。有没有办法从移动浏览器启动Unity3d应用程序?

What about on an Android phone or an iPad? Our application runs in the mobile browser on these devices. I'm not aware that there is a Unity3d plugin available for mobile browsers. I'm also not aware of any way to start an app from a web page. Is there any way to start a Unity3d app from a mobile browser?

欢迎任何建议。

推荐答案

你认为Unity3d没有移动播放器是正确的。

You're right in assuming that Unity3d doesn't have players for mobile.

我不知道如何为Android做这个但对于iOS,您可以构建Unity项目,然后打开它创建的xCode项目并添加自定义URL方案。这个解释了如何执行此操作。

I don't know how to do this for Android but for iOS you can build the Unity project then open up the xCode project that it created and add a custom URL Scheme. This tutorial explains how to do this.

完成所有这些后,您可以在浏览器页面中创建一个使用您创建的URL架构的链接。

After all this you can create a link in your browser page that uses the URL Schema you created.

 <a href="myunityapp://something">Go to Unity</a>

请注意,您需要具有唯一的URL架构,否则Safari可以打开其他具有相同的Schema注册。

Note that you need to have a URL Schema that is unique otherwise Safari can open other apps that have the same Schema registered.

这篇关于如何从移动浏览器启动Unity3d应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-23 20:11