Ramesh Ramesh - 1 year ago 251
iOS Question

How to start Unity3d app from mobile browser?

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).

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.

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?

Any suggestions welcome.

Answer Source

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

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.

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>

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download