简体   繁体   English

将android eclipse库添加到unity3d项目中

[英]Add android eclipse library to unity3d project

I have an android library in the form of an eclipse project that I want to integrate with unity3d. 我有一个eclipse项目形式的android库,我想与unity3d集成。 I know I can make a jar from eclipse and drop it in unity's plugins/android folder. 我知道我可以从eclipse制作一个jar并将它放在unity的plugins / android文件夹中。 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. 如果我将统一游戏导出到eclipse项目,我可以右键单击并将android项目添加为库。 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. 我想要一种告诉团结的方法,我希望这个eclipse项目在导出时链接为一个android库。 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? 有没有人知道这样做的方法,或者如何将资源打包到jar或其他方式让这些东西说话?

One possible way to go is using Unity's Build Player Pipeline . 一种可能的方法是使用Unity的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#. 根据您正在使用的平台,您必须设置shell脚本或在C#中执行您的操作。

It's some year ago that I were a Java/Eclipse expert as I am working on iOS now. 一年前,我是一名Java / Eclipse专家,因为我现在在iOS上工作。 The Android Developers page shows some way to manipulate projects via command line . Android Developers页面显示了通过命令行操作项目的一些方法。

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 . 也许更好的方法是使用Eclipse开关,如--import(s。 在命令行上创建Eclipse项目的第一个答案和提供的链接),但另一方面,我在帮助页面中找不到开关。

Well, not really a bounty answer but maybe some inspiration :-) 嗯,不是真正的赏金回答,但可能是一些灵感:-)

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. 我发现的唯一真正的答案是,在4.2中,你可以在plugins / android中删除一个eclipse项目,它将被正确链接。 Just have to hang on I suppose. 我想,只需坚持下去。 :-/ : - /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM