Unity 5.2.2f1, Win7 64bits.
As the document said, unity will merge the android library projects in “Assets/Plugins/Android/”.
I make a simple unity project contains a simple android library project.
The structure is like this:
Assets
- AndroidCallback.cs
- Scene.unity
- Plugins
±---- Android
±-------- androidplugintest
±------------ AndroidManifest.xml
±------------ project.properties
±------------ assets
±---------------- folder
±-------------------- a.txt
±------------ bin
±---------------- androidtestplugin.jar
The scene contains a “Text” and a “Button”.
When tap the button, it will call a java function (com.example.AndroidCallback.Utility.Test, implements in androidtestplugin.jar).
The function will use “AssetManager” to open the file “a.txt” with the path “folder/a.txt”, and then send the file contents to the text control in the scene.
But if you build and run the project, you will receive a FileNotFound exception.
Use rootexplorer (a file manager for android) to view the exported apk file, I found that text file is named as “folder\a.txt” (not a folder and a file) inside assets folder. (see the second attachment)
I think it is why the AssetManager fails.
Does I make some mistake or it is just a bug?
(The first attachment contains all projects)
2354558–159543–New Unity Project.zip (73.9 KB)
