0

After exporting my game made with unity, I got two files web.html and web.unity3d

I want to embed this game in a phonegap app. I used this code:

<object id="UnityObject" classid=" clsid:444785F1-DE89-4295-863A-D46C3A781394" width="1024" height="768" codebase="http://webplayer.unity3d.com/download_webplayer/UnityWebPlayer.cab#version=2,0,0,0">
<param name="Web/Web.unity3d" value="Web.unity3d" />
    <embed id="UnityEmbed" src="Web/Web.unity3d" width="1024" height="768" type="application/vnd.unity" pluginspage="http://www.unity3d.com/unity-web-player-2.x" /></object>

This code works on the browser but nothing shows when I build with xcode.

Amirado
  • 1,053
  • 1
  • 8
  • 12
  • 2
    I think you just can't do it. To run .unity3d file you'll need a Unity WebPlayer plugin on your browser and, there is none for mobile browsers, at last I never saw something like this. There isn't even a Unity WebPlayer for linux, today you still need a work arround to run Unity WebPlayer games on linux... – Frohlich Nov 10 '15 at 11:46

1 Answers1

1

You probably can't do it building your project for Unity WebPlayer once you'll need to install a browser plugin to run it, that doesn't have a native version for mobile platforms.

To use phonegap maybe you should approach building your app as a native project for your iOS ( and/or Android ) or try WebGL that already have support on some devices (I really don't know if there is WebGL support on iOS (maybe on iOS8), I read something about android but never tried it)...

Frohlich
  • 953
  • 7
  • 17