public static string GetInternalStorageDirectory() { AndroidJavaObject currentActivity = AndroidUtils.GetCurrentActivity(); AndroidJavaObject internalStorageFile = currentActivity.Call <AndroidJavaObject>("getFilesDir"); string internalStoragePath = internalStorageFile.Call <string>("getAbsolutePath"); return(internalStoragePath); }
internal static void UnpackAllAssets(string assetDirectory, string outputDirectory) { AndroidJavaObject currentActivity = AndroidUtils.GetCurrentActivity(); AndroidJavaClass fileUtils = new AndroidJavaClass("com.eighti.unity.androidutils.FileUtils"); fileUtils.CallStatic("unpackAssets", assetDirectory, outputDirectory, currentActivity); }
public AndroidAssetUnpacker() { currentActivity = AndroidUtils.GetCurrentActivity(); assetUnpacker = new AndroidJavaObject("com.eighti.unity.androidutils.ObbUnpacker", currentActivity, Uniforms.buildDataPath); }