I'm trying to read from a file in Assets using FileManager and am getting really odd behavior. Sometimes the file will be read correctly, sometimes the file will be read with random text appended to it like the word "screenshot", but most times it just returns null. I've checked the file system on my computer and confirmed that the file exists with the right data. I've also tested this through CreoPlayer with the same issues.
This is how I create the file:
Console.write('CreateRoom returns \(value)');
FileManager1.delete("roomID");
FileManager1.createFile("roomID", value['roomID']);
This is how I read the file:
var path = FileManager1.path("roomID");
var f = File.open(path, FileMode.Read);
var s = f.readString();
Console.write("Luxo Client roomID is \(s)");
f.close();
This also only happens with some files and not others. I use this exact same code to access other files without a problem. Is this a known issue or I am doing something wrong?