I am trying to find analogue for Application.persistentDataPath from Unity3D.
http://docs.unity3d.com/ScriptReference/Application-persistentDataPath.html
I want to store user profile’s data and saved games in Users directory for Windows platform and in the data directory for Android (IOS).
What is the correct way to do this with UE4? Is it right to keep the profile’s data in Saved directory?
>Using the External Storage
I found some low level code in AndroidJNI.cpp:
jclass EnvClass = Env->FindClass("android/os/Environment");
jmethodID getExternalStorageDir = Env->GetStaticMethodID(EnvClass, "getExternalStorageDirectory", "()Ljava/io/File;");
jobject externalStoragePath = Env->CallStaticObjectMethod(EnvClass, getExternalStorageDir, nullptr);
jmethodID getFilePath = Env->GetMethodID(Env->FindClass("java/io/File"), "getPath", "()Ljava/lang/String;");
jstring pathString = (jstring)Env->CallObjectMethod(externalStoragePath, getFilePath, nullptr);
const char *nativePathString = Env->GetStringUTFChars(pathString, 0);
// Copy that somewhere safe
GFilePathBase = FString(nativePathString);
But this method is too much lowlevel.