Loading external Json files into scene variables

I’m trying to make Trivia game, I ran into a problem.

I got Json files I need to import into the game as variables.

Works like charm in the preview using FileSystem

Does not work at all when exporting to desktop.

Plus I’d like to know if it’s possible at all to load external Json files in the mobile export. Locally or online.

Any suggestions?

I do not believe the Filesystem is valid for mobile, only WIN, Mac, and Linux. Is the FileSystem path properly set when it is exported? Maybe it is looking for a path that works in editor but is no longer valid on export?

A few things to note:

  1. Filesystem events are desktop only, and will not work for mobile or web.
  2. If you’re using events to load the files, ensure you’re loading their paths using the filesystem expressions, not using a direct path. Direct paths do not work.
  3. Also, if the JSON files are static, just copy their contents and paste them into a pre-made string variable and you can just load the JSON from that string.
1 Like