4

I have an android library in the form of an eclipse project that I want to integrate with unity3d. I know I can make a jar from eclipse and drop it in unity's plugins/android folder. However as I understand it that necessarily strips out the resources from the project.

If I export the unity game to an eclipse project, I can right-click and add the android project as a library. However I don't like this approach because it doesn't fit with our current automation process - which basically just script's unity's build dialog.

I'd like a way to tell unity that I want this eclipse project linked as an android library on export. Does anyone know a way to do that, or how to pack the resources into the jar or another way of getting this stuff to talk?

2 Answers 2

2
+75

One possible way to go is using Unity's Build Player Pipeline. Depending on the platform you are working on you then have to set up a shell script or do your stuff in C#.

It's some year ago that I were a Java/Eclipse expert as I am working on iOS now. The Android Developers page shows some way to manipulate projects via command line.

Maybe the better way to go is using Eclipse switches like --import (s. 1st answer in Create an Eclipse project on the command line? and the link provided) but on the other hand I can't find the switch in the help pages.

Well, not really a bounty answer but maybe some inspiration :-)

1

The only real answer I've found is that in 4.2, you can drop an eclipse project in plugins/android and it will be linked correctly. Just have to hang on I suppose. :-/

3
  • ...and now we're on 4.3 and this process works fine.
    – tenpn
    Commented Jan 17, 2014 at 21:15
  • can you elaborate what you do? Do you drop your entire project into the plugins/android folder (so that you have a structure plugins/android/MyProject/res, for example), or do you copy the res folder straight into the /plugins/android folder (so that you have a plugins/android/res structure)? Commented Jan 18, 2014 at 3:07
  • the former. the entire project into the plugins folder.
    – tenpn
    Commented Jan 18, 2014 at 9:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.