Question by
trebal · Jan 11, 2018 at 10:39 AM ·
reading dataread-onlyreadonly
Best way to store and read static information in Unity ?
I'm working in Unity and I'm in a point that I need to store a lot of values (Vector3 most of them) for different items. This values are positions into other objects, lets say A, B, C and D. This information is always the same, read-only. Right now I'm using scripts, attached to each item, that only have public variables, but this way doesn't look very optimal to me and it's not efficient, because not all objects use all positions. For example one object uses A, B but other uses only C. An script for each one is not a good solution. I would like to know if it would be better to use a database. I've looking around and I found people using JSON files, but also XML or even TXT. What would be the most optimal way ?
Comment