Hi guys, I need a little help with Unity integration in Eclipse
My help page: => here
I have a Unity3D Pro version and an Android Plugin Pro version
- Set up your Android Unity project as usual and click Build.
- Enter the project folder, go to the Temp / StagingArea page.
- Copy all project files to a new folder.
- Import this folder into a new Android project in Eclipse.
- Mark this project as a library in the properties window for the project. (Right-click on the project name, go to "Properties"> "Android" and check "Library".)
- Create a new Android project in Eclipse. This will be the Java part of your project.
- Add the Unity Android project as a library to the new project. (Right-click on the name of the project, open "Properties-> Android", select "Add ...", add the project.)
- Add the classes.jar library to the library links for your new project. (In the properties, go to Java_Build_path-> Libraries, select "Add external jar ...", go to UNITY_INSTALLATION \ Editor \ Data \ PlaybackEngines \ and roidplayer \ bin and add classes.jar)
Now, if I run this small project on my device, I get something like this
You can see the image at this link.
https://copy.com/vVaCyQTEUECV
The next step:
res .
AndroidMnifest.xml
MainActivity.java
package com.Developer.PackMan;
import com.unity3d.player.UnityPlayerNativeActivity;
import android.os.Bundle;
public class MainActivity extends UnityPlayerNativeActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
}
Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.Developer.PackMan" android:theme="@android:style/Theme.NoTitleBar" android:versionName="1.0" android:versionCode="1" android:installLocation="preferExternal">
<supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
<application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false">
<activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:label="@string/app_name" android:screenOrientation="landscape" android:launchMode="singleTask" android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
</activity>
</application>
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19" />
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.sensor.accelerometer" />
</manifest>
) com.Developer.Packman) , .
, LogCat Console, .
. .