- Home /
This question was
closed Jun 20, 2020 at 09:27 AM by
WhisperXD for the following reason:
The question is answered, right answer was accepted
Question by
WhisperXD · Jun 18, 2020 at 12:29 PM ·
jsonfindstreamingassets
can't find json file on android ?
i put "Items.json" file in "StreamingAssets" folder, but it can't find in "Items.json" file. this my script
private JsonData itemData;
void Start()
{
itemData = "jar:file://" + Application.dataPath + "!/assets/" + "Items.json";
}
console say : InvalidOperationException: The JsonData instance has to be initialized first LitJson.JsonData.EnsureCollection () LitJson.JsonData.get_Count () ItemDatabase.ConstructItemDatabase () ItemDatabase.Start ()
Comment
Answer by PlanarBit · Jun 19, 2020 at 11:42 AM
Try this instead:
itemData = $"{Application.streamingAssetsPath}/items.json";
Follow this Question
Related Questions
Streaming Assets android 0 Answers
How do I get into my StreamingAssets folder for the Web? 0 Answers
Accesing StreamingsAssets in android (LitJson) 1 Answer
Can't use json file from StreamingAssets on Android and iOS 0 Answers
Loaclization in WebGL? 1 Answer