- Home /
Information Panel // File Types // Remote URL Loading
Hi All,
I have a 3 part question here (which I hope is summed up by the question title. I will provide a bit of context then ask the 3 part question
Context:
I'm creating an educational game for new starters within my business. The game essentially walks them through our product suite and lets them interact with technical aspects of the way our products are delivered to end users.
Each element within the network is interact able. When clicking on the object a UI screen appears with information about that element. It might contain text, moveable 3d model of the element, videos, links to support resources etc.
I have created the world (using placeholder objects currently), created the UI, created placeholder text, loaded all the models etc, however I want the text to be easily updatable.
I plan on having the game world fairly static (as the 3d models and placed elements aren't likely to change often) however the information about the objects will change and update as time goes on.
What I need is to have is the application load text content from a file that will be maintained by another Knowledge Management group. This file will be located on a web server (we currently use Confluence, so I will just host it there - it will not be a confluence page, but rather, an uploaded file the game will have direct access to).
My requirements are:
This content file must be editable by someone outside of the Unity Development team (me). I have no specific preference for file format, other than it must be easily parseable by Unity and easily editable by the Knowledge Management Team
The game will access the file each time the game is loaded (or at least, I will implement a check to see whether the file has changed, triggering a new download)
The game will then populate the information screens (see example below) with the information loaded from the remote file.
I've looked at the common "JSON vs XML" threads that are around and it seems that both are usable, however I'm unsure whether they will be fit for purpose. Most of of the text that will be required to load will be rather long - think of long Quest text in a game.
My 3 part question
What would be a best way to handle the data? Is JSON or XML a good way to handle lots of text? note that the text will need to be semi formatted (likely to contain bullet points, basic highlighting (bolding, italics, font sizes etc)
I cannot have the data manually added in Unity at build time as this would require me to maintain the application (something that can't happen in this instance) - am I on the right track when it comes to this approach? Is there a better approach?
As the remote information file will end up being rather large, is there a way to load parts of a file, rather than the whole thing, as I read that loading a large file remotely like this can delay start up times? (Content would likely be < 1mb of raw text).
Thank you for your assistance, sorry this is rather a vague (and very long winded) question - I'm really unsure of what to search for at this stage. I know what the end state looks like (in my head) but I'm not sure of the first step here!
Regards
Joel
Example screen capture of the UI where the text will be populated. The left text will be one section of the file, whilst the right text would be a separate section of the file. Note that I'm only using placeholder artwork etc so it looks a bit rough at the moment, just working on functionality at the moment, prettiness will come later!
Your answer
![](https://koobas.hobune.stream/wayback/20220612174354im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Saves on android, could not find file 0 Answers
JSON vs XML for Unity C# 1 Answer
High-level data organization advice for simulationist game 0 Answers
Issues saving file in iOS 0 Answers
How do I access music files on the Oculus Quest and play them? 0 Answers