I need to write a plugin that save to the readable/writeable persistent path of the game.
Is there a way to know?? or should I pass the value somewhere at runtime?
I need to write a plugin that save to the readable/writeable persistent path of the game.
Is there a way to know?? or should I pass the value somewhere at runtime?
If you want to do this in C#, just construct a path to the app’s Documents directory using:
Application.persistentDataPath + "/" + fileName;
If you want to do this using Objective-C native code, you will need to access it like this:
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [paths objectAtIndex:0];
NSString *myDocumentsFolderFilePath = [documentsDir stringByAppendingPathComponent:@"myFileName.txt"];