- Home /
APK built with MAC cant read JSON file
When I built the project at my house on my Windows PC the Game could read the JSON file in resources no problem on mobile but at my office space I tried building the game using a mac and the game couldn't read the JSON file in resources. Any Ideas why this happened?
//JSON
TextAsset txt = (TextAsset)Resources.Load("Data/Items", typeof(TextAsset));
jsonString = txt.text;
itemData = JsonMapper.ToObject (jsonString);
Nothing looks wrong with this code, if you're building on the same device, then its almost certainly a difference in the location or contents of the file you are trying to use on the mac.
Answer by Dustin-Horne · Nov 09, 2015 at 05:38 PM
Is there a particular error you're getting? I wonder if the encoding of the file is getting changed and possibly a BOM marker getting added when you're doing things with that json file on the MAC.
Your answer
Follow this Question
Related Questions
why unity not resolving aar and jar files 0 Answers
CommandInvokationFailure: Gradle build failed. unity 2019.4.22 1 Answer
Use Android plugin with android support library dependency with gradle builds in Unity 5.5 1 Answer
Can't install openJDK 1 Answer
When update android project from 2017 to 2018, I can't build it anymore 0 Answers