Easy Save can't create folders inside StreamingAssets folder!

Discussion and help for Easy Save 3
Post Reply
88888888
Posts: 25
Joined: Tue Sep 10, 2019 10:41 pm

Easy Save can't create folders inside StreamingAssets folder!

Post by 88888888 »

Hi. I need to save some of my save files inside StreamingAssets folder but there is a problem that easy save can't create folders inside this folder! It can save .es3 files inside this folder but can't create folders.

For example it can save with below path
StreamingAssets\Test.es3

But can't save with below path
StreamingAssets\New Folder\Test.es3

User avatar
Joel
Moodkie Staff
Posts: 3676
Joined: Wed Nov 07, 2012 10:32 pm

Re: Easy Save can't create folders inside StreamingAssets folder!

Post by Joel »

Hi there,

Unity's Streaming Assets Path isn't writeable at runtime on most platforms and doesn't have required permissions to create subfolders on some. For more information please see Unity's documentation, as this is a limitation at their end rather than ours:
On many platforms, the streaming assets folder location is read-only; you can not modify or write new files there at runtime. Use Application.persistentDataPath for a folder location that is writable.
https://docs.unity3d.com/Manual/StreamingAssets.html

As noted, you should instead using Application.persistentDataPath if you intend on creating files or folders at runtime. Easy Save uses this location by default.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

88888888
Posts: 25
Joined: Tue Sep 10, 2019 10:41 pm

Re: Easy Save can't create folders inside StreamingAssets folder!

Post by 88888888 »

We can save .es3 files on StreamingAsset on build version we do this to save some information about characters. Other player that going to play this game doesn't need to save anything there so it's a developers task for us and we use PC.

We need to get character names at runtime and create a separated save folder for each character it's wired why easy save can create .es3 on StreamingAssets folder but can't add folders like other drives on the hard drive.

User avatar
Joel
Moodkie Staff
Posts: 3676
Joined: Wed Nov 07, 2012 10:32 pm

Re: Easy Save can't create folders inside StreamingAssets folder!

Post by Joel »

Hi there,

Just to clarify, because Unity has provided permission to write files to a directory, it doesn't mean they've also provided permissions to create sub-directories. This is defined at Unity's end, not ours, so you would need to contact them for more information on why they don't have this permission set.

If you're saying that the directory has permissions to write sub-directories, and it's still not working, please could you show me a script which I can place into a new scene in a new project which replicates it being able to create a file but not being able to create a subdirectory, and also let me know the platform you're targeting?

Also please could you let me know what error is being outputted to the log file when it fails to create a directory? Any failure to write data will result in an exception being logged to the log file.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started

88888888
Posts: 25
Joined: Tue Sep 10, 2019 10:41 pm

Re: Easy Save can't create folders inside StreamingAssets folder!

Post by 88888888 »

Joel wrote:
Sun Aug 01, 2021 12:09 pm
Hi there,

Just to clarify, because Unity has provided permission to write files to a directory, it doesn't mean they've also provided permissions to create sub-directories. This is defined at Unity's end, not ours, so you would need to contact them for more information on why they don't have this permission set.

If you're saying that the directory has permissions to write sub-directories, and it's still not working, please could you show me a script which I can place into a new scene in a new project which replicates it being able to create a file but not being able to create a subdirectory, and also let me know the platform you're targeting?

Also please could you let me know what error is being outputted to the log file when it fails to create a directory? Any failure to write data will result in an exception being logged to the log file.

All the best,
Joel
Thank you. It solves the problem when I set full path instead of StreamingAssets\Save Data\Save.es3 to D:\Project\Assets\StreamingAssets\Save Data\Save.es3

Post Reply