Hi all,
I have a client that, when they try to run my game, they get
DirectoryNotFoundException: Could not find a part of the path "/private/var/folders/5p/bq_l_2w95r9fwc9ms971tflw0000gn/T/AppTranslocation/FC5A4B32-E769-4053-B81F-D5ACBE4D1C2C/d/Mac Client.app/Contents/StreamingAssets/profanityList.txt".
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x001be] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at System.IO.File.OpenRead (System.String path) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) [0x00077] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:167
at System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string,System.Text.Encoding)
at System.IO.File.ReadAllText (System.String path, System.Text.Encoding encoding) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:587
at System.IO.File.ReadAllText (System.String path) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:582
at Chat.Start () [0x00010] in D:\TFW\The False World\Assets\Scripts\UI scripts\Chat.cs:75
(Filename: /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs Line: 292)
I’ve tested on Windows and Ubuntu, and neither encounter this error.
I’m accessing the StreamingAssets folder by using the following
string file = File.ReadAllText(Application.dataPath + "/StreamingAssets/profanityList.txt");
Which, according to the docs, should be valid for Mac OS.
Anyone have any suggestions on what might be causing the issue?
Thanks!