Re: Cordova/Phonegap and Unity

1,524 views
Skip to first unread message

aasthaclabs

unread,
Dec 18, 2013, 11:48:17 PM12/18/13
to phon...@googlegroups.com
Hi Andrew,
Can u please tell me the steps to integrate cordova in unity or any tutorial for this?

Nastase Catalin Alexandru

unread,
Feb 15, 2014, 8:57:00 AM2/15/14
to phon...@googlegroups.com
Hello Andrew,
Unity3D exports the XCode project for iOS because of legal limitations, otherwise you would get an .ipa file after build is done as you get an .apk for Android(though it's compiled for you using the android sdk provided). For Windows, Mac and Linux builds you get directly the executable files (project binary data and the player executable file) and you don't have access to those player's code as it is not intended.
Unity3D was created to make everything inside it, test it in the editor and with very little modifications be able to export to all supported platforms (there are some limitations of course but in most cases it works flawlessly).
I am not sure why you took this approach instead of using a web-view plugin inside Unity3D, that way you could see and test the final application right inside Unity3d editor and also use Unity3d profiler if you're using the pro version.

 Hope this helped you.
Regards.

On Tuesday, April 9, 2013 6:54:12 PM UTC+3, Andrew Cowling wrote:
Hello all,
   I am working on a hybrid Unity/Cordova application. I have successfully deployed to iOS by changing relevant bits of the Unity generated XCode project to add Cordova as a subview to Unity's view. I change the frame size of the Cordova view based on how much I want to reveal of Unity running underneath.
For example for full page web forms I expand it to full screen, and most of the rest of the time it is a web page that only takes up the bottom 15% of the screen on top of Unity. I also have two way comms working, by a PG plugin that calls the Unity SendMessage and exposed a call to Unity that lets Cordova evaluate js.
   My question is this, I am porting to Android now, and would like to know how to get the same kind of integration. I haven't worked that much with Android stuff, although I do have plenty years of experience in Java. Can someone please give me a high level of what to do? 
   I tried making a library which has a DroidGap derived activity and a POJO that when constructed, grabs the current Unity activity, creates an intent and starts the subclassed DroidGap activity. In Unity I tried constructing that at init time, with 2 results. If I change the AndroidManifest to include the subclassed activity, I get an error parsing the package when I try to install, and when I don't alter the android manifest, I get a failure to start.
   Thank you for your time,
Andy

Abhishek Vaka

unread,
Aug 21, 2017, 7:35:41 AM8/21/17
to phonegap, kat...@gmail.com
HI guys ,
I have a Unity 3D Xcode project for IOS . I need it to import it in a cordova project . Please Guide me . I hevent found anything online that has worked yet ..

Steve Husting

unread,
Aug 21, 2017, 11:02:43 AM8/21/17
to phonegap, kat...@gmail.com
Please do not resurrect old threads. Return to the group's home page and insert all the information requested in a new post so we can help you.
Reply all
Reply to author
Forward
0 new messages