Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Last active May 27, 2018 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/2a7003d67c7b9d973291d74275cc32bf to your computer and use it in GitHub Desktop.
Save flushpot1125/2a7003d67c7b9d973291d74275cc32bf to your computer and use it in GitHub Desktop.
/*alomost copied from http://blog.narumium.net/2016/12/09/unityで画像をandroid本体に保存する/*/
string path = "";
string pointcloudDataPath;
using ( jcE nvironment = new AndroidJavaClass ("android.os.Environment"))
using (AndroidJavaObject joExDir = jcEnvironment.CallStatic<AndroidJavaObject> ("getExternalStorageDirectory")) {
path = joExDir.Call<string>("toString"); // /storage/sdcard/0
pointcloudDataPath = path + "/pointcloud"; // /storage/sdcard/0/pointcloud
//フォルダがなければ作成
if (!Directory.Exists(pointcloudDataPath)) Directory.CreateDirectory(pointcloudDataPath);
/**/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment