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
Easy Save can't create folders inside StreamingAssets folder!
Re: Easy Save can't create folders inside StreamingAssets folder!
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:
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
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:
https://docs.unity3d.com/Manual/StreamingAssets.htmlOn 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.
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
Re: Easy Save can't create folders inside StreamingAssets folder!
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.
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.
Re: Easy Save can't create folders inside StreamingAssets folder!
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
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
Re: Easy Save can't create folders inside StreamingAssets folder!
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.es3Joel 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