So in my game it requires you to write an input file name that is stored in the resources folder of my assets.
It works perfectly fine if I ONLY build this game via “build and run”.
I’m so lost, I don’t know where this error can come from. Mainly because it worked the 1st time and the directory does exist. So how come it won’t work after the 1st time?
@palex-nx Thanks for the advice but that didn’t solve my problem. What did solve my problem though wasNope, that didn’t work. But changing the path to path = Application.dataPath + "/StreamingAssets/CSV/";
worked so …? What would the reason for that be.
Of course, but this will solve another problem you’ll have when (and if) you try to run your game on another platforms. Also path.combine ensure correct path. Also probably you shoul make sure players can’t enter paths starting from … like …/…/…/Desktop/MyHackedDataFile.txt because File.ReadAllText will actually load any file from user’s filesystem into your game.