예제 #1
0
        public static string GetInternalStorageDirectory()
        {
            AndroidJavaObject currentActivity     = AndroidUtils.GetCurrentActivity();
            AndroidJavaObject internalStorageFile = currentActivity.Call <AndroidJavaObject>("getFilesDir");
            string            internalStoragePath = internalStorageFile.Call <string>("getAbsolutePath");

            return(internalStoragePath);
        }
예제 #2
0
        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);
 }