- Home /
How to rapidly assign and reassign component data within gameobjects based off API data
Alright, so I am currently struggling with a concept I find complicating. I am reading an API data, and creating a game object to represent a unique entry. The API data can contain upwards to 500+ entries.
The problem I am having, is the data from the API is rapidly changing. Sometimes one entry doesn't show up in the JSON data but will show up in the next, or new ones will be introduced, or that entry may be missing data altogether. I would like to avoid doing a search based off some identifier, update that game objects information, and continue on in the loop until every object is updated. I would also like to avoid having to check if new objects have to be added. I feel like I'm doing a poor job trying to manage a dataset this way, considering so many objects are either added or removed with each update of the API.
Is there a better method than looping and updating based off some identifier? The reason I chose that method is I would like to preserve the individual game object while the entry is in the JSON. I want the user to be able to click it, and show the details from the json.
Your answer
Follow this Question
Related Questions
using Contains(gameObject) to find and destroy a gameObject from a list 2 Answers
How do I move one of many instantiated gameobjects ONLY if it's currently selected in a list? 1 Answer
I want some gameobjects are all unactive! 1 Answer
How do I add new instances of a object into a list? 1 Answer
Saving GameObject to file 2 Answers