- Home /
Building on PC or MAX
I have a simple game which requires the reading of text files, and also uses GUI Layout, etc.. Everything works fine on my system, but when i build a release for PC or MAC, and run it the text and GUI labels, text areas and so on are not visible. I don't know whether they are rendered and not visible, or not rendered at all. Anybody got a clue on why this is?
Thanks in advance.
Cheers!!
Edit: I ran it in a development build and found that, it was not able to access the file path. I am not using TextAssets but StreamReader.
$$anonymous$$ost of your folders not readable anymore after compiling the game, so if you're using a path like Application.dataPath + @"/Folder/File" it's not possible anymore. Also, PC and $$anonymous$$AC have different paths. Hope this'll help you a bit.
Like $$anonymous$$alfegor said above. You can't just put them in files. You have to use the Resources file. Which is a file reserved for just what you are doing refer to:
https://docs.unity3d.com/Documentation/ScriptReference/Resources.html
Your answer
Follow this Question
Related Questions
Cross platform Xbox 360 controller (PC,Mac,Xbox 360/One) 1 Answer
How to Avoid Corner paths in A* pathfinding 1 Answer
GuiTexture For Jump A Character 0 Answers
unity pro file sharing 1 Answer