I’m using JavaScript, so I think this will make a big difference compared to other languages.
//count the number of items we need to load in
4
//[ITEMID] : [SCALEX] , [SCALEY] : [TEXTURENAME] : [STEPCOUNT] : [STEPS] , ... , [STEPSN]
0 : 1, 1 : foo : 3 : 0, 1, 2
1 : 1, 1 : bar : 3 : 2, 1, 0
2 : 2, 2 : pud : 5 : 1, 2, 3, 4, 5
3 : 3, 3 : lye : 8 : 1, 2, 3, 4, 5, 6, 7, 8
So, this is a new area of Unity that I haven’t experienced yet. I know how to load and read data into fixed-size arrays in Unity. This one I’m not so sure about, because the data-types change (and that a field can have an N amount of values). However, prior programming experience tells me that this ends up turning into (pseudocode):
class CustomClass
ID as integer
Scale as Vector2
Tex as string
Count as integer
Steps[] as integer
end class
classArray as List<CustomClass>
Thankfully, this data is fixed - it will never get modified while in memory and won’t need to be saved on exit. How does one go about defining a class array and populating it in JavaScript? Any pointers or tips?