- Home /
How to get Application.PersistentDataPath inside a Java Android Plugin
In Java, I'm able to get a list of the files located in Unity's Application.PersistentDataPath using
AssetManager assetManager = UnityPlayer.currentActivity.getAssets();
String[] files = assetManager.list("");
But I have no idea how to get the actual path of Application.PersistentDataPath. Getting this path in C# is easy, but I need to know what the path is from inside the Java library.
Thank you for any help!
Answer by pajamajama · Jun 23, 2017 at 06:03 PM
Figured it out.
UnityPlayer.currentActivity.getExternalFilesDir("").getAbsolutePath()
Your answer
Follow this Question
Related Questions
How do I override an Android Java class in Unity? 1 Answer
How to write a java lib for unity as a plugin to make run another android app? 1 Answer
Having issue with "unable to convert class to dex format" extremely simple JAR in empty project. 0 Answers
Help building changes to .java file included in Unity supplied package. 1 Answer
Call android code which then calls a method in jar file 1 Answer