Original address: http://blog.csdn.net/h570768995/article/details/9355313
There are always a lot of challenges in the eclipse development process, and it's important to use good tools to help us develop faster.
Here's how eclipse works together with unity 3D:
1, first in the Unity3d to create a simple project file
2, OK, next click "File", "Build setting"
3, then click "Build" to remember the name of the. apk that you Build. In this case, the "temp" folder will appear in the project directory (no build operation will occur).
4, click to go in, the Inside folder "Stagingarea" Copy to a location (I put directly on the desktop)
5, next eclipse, launch Eclipse, click "File", "import", "existing Android code into workplace", looking for "Stagingarea" folder, Import it in. This folder appears in your project directory (names may not be the same)
6, right-click the directory. Select "Properties", "Android", "is Library", tick, that is set as information.
7, OK, now is the time to create a new project in Eclipse, please create a new project directory named "Chenhao" (the name of the. apk in Unity3d), then right-click and add the external package as shown, we need to add "Unity installation directory \ Editor\data\playbackengines\androidplayer\bin\classes.jar "file.
8, okay, don't panic, it's almost over.
Copy all the assets files in the Stagingarea project to assets inside the Chenhao directory.
The corresponding folder is available in the assets.
9, right-click "Chenhao" Project catalog, select "Properties", "Java Build Path", "Order and export"
such as, hit the hook, finish!
10, set in your main activity
Because it inherits unityplayeractivity, it shows Unity's work directly.
So in the code you can comment out "//setcontentview (R.layout.activity_main);"
11, OK, finally finished ^ ^, then run the project.
"Friendly tips, unity3d to use the real machine test, otherwise there will be many unexpected errors."