I’m creating a project where the objective is to find objects in separate levels, however apart from having a GameObject
that doesn’t get destroyed I’m unsure where to go from here. I need a system that goes checks a database when loading a level and only creates the collectables that have not been found yet or destroys the collectables in the level that have already been found once the level is loaded.
Can anyone point me in the direction of a good place to start? The system needs to work on all of the mobile platforms (Windows Phone, iOS, Android, and Blackberry 10) and be possible in JS. I’ve read a bit about XML files however most tutorials are not built for those who are a newcomers of XML.
[Edit for Clarity]
When I say database I meant a local file that stores the data for an object in the scene, basically in Unity I have 5 levels, in each level there are 3 collectables. When a level is loaded I want to have an array of GameObject called Collectables in a GameController object and use GameObject.FindGameObjectsWithTag("Collectable");
to populate that array. After that is done I want to read some sort of data file, the file needs to have an ID number for each level to only check the data that corresponds with the the id of the current level in Unity and an ID for each collectable, and then go through the data for each Collectable from the file, if a Collectable has the IsCollected value of true then it should destroy the GameObject from the Collectables array in the scene. I’ve done my best to write an XML that best portrays what I need in the data Here.