Trying to use caching, and encountering a strange problem. After calling StoreCachedFile(fileName), the file saves on the drive, clearly visible in Windows Explorer. When trying to load the file with ES3.CacheFile(fileName), the file cannot be found. File.Exists returns false.
If I delete the file from Windows Explorer, and create it manually via a text editor, ES3.CacheFile is able to load it just fine.
Any ideas as to what the issue is?
After cached file is saved to disk, File.Exists can't find the file
-
- Posts: 3
- Joined: Thu Jan 20, 2022 3:52 am
Re: After cached file is saved to disk, File.Exists can't find the file
Hi there,
Assuming your file names match in both calls, this sounds like an OS issue. Please could you send me a script which I can drop into a new scene in a new project which replicates this so I can test it at my end?
All the best,
Joel
Assuming your file names match in both calls, this sounds like an OS issue. Please could you send me a script which I can drop into a new scene in a new project which replicates this so I can test it at my end?
All the best,
Joel
-
- Posts: 3
- Joined: Thu Jan 20, 2022 3:52 am
Re: After cached file is saved to disk, File.Exists can't find the file
Thanks, Joel, for the quick response.
I tried directly writing the file content using .NET classes directly instead of ES3, but with the same result. So, it's not a ES3 issue. I'll have to figure out what's happening on my system!
I tried directly writing the file content using .NET classes directly instead of ES3, but with the same result. So, it's not a ES3 issue. I'll have to figure out what's happening on my system!
-
- Posts: 3
- Joined: Thu Jan 20, 2022 3:52 am
Re: After cached file is saved to disk, File.Exists can't find the file
It turns out, the issue was my misuse of TextMeshPro in the save code. I was passing the wrong class (TextMeshProUGUI rather than TMP_InputField), one of which has a zero-width space at the end of the .text property, and the other did not
Re: After cached file is saved to disk, File.Exists can't find the file
Glad you managed to resolve your issue
All the best,
Joel
All the best,
Joel