Hello I am curious how this would be achieved if possible So imagine a JSON file that keeps writing new lines in a server which are positions Would it be possible to pull that JSON file from a server and continuously update a Game Object position to match that of the JSON file? Any help or directions would be greatly appreciated
For what purpose? And continuously update, what is changing, is it the JSON file? You might want to check out Unity Remote Config, but not sure about your implementation. Or are you trying to make a multiplayer game and want all users to see the same position? You probably want to use a multiplayer asset instead, if so.
If you're trying to use a file for some form of inter-process or network communication, then JSON wouldn't be what I'd use. If I was crazy enough to do it this way, I'd probably use a CSV.
So its for pulling live data. So imagine a tracking device that updates a JSON file with live co-ordinates on a server. I would like to pull that data into unity.
I could have the company provide me a CSV file if it would make it easier to pull the data but would something like this be possible if the CSV keeps being updated live.
First step seems would be to implement the logic to check a local file continuously, perhaps in your Update() method.
Ok that what I was thinking to do it first locally and then online but it sounds like it might be possible to make it work Ideally I would like the data to be translated to the position of a game object in 3D space.
Even easier, put 3 text input objects on your scene name posX, posY and posZ. Enter numeric values and move a game object on a button click. Expand from there.
Hey eni8ma, I am looking to import json from an api and use that for data visualization. How did your project go? Any further news on how to update a game based on data?