I am developing an iOs project which needs to store a lot of optimised level data.
Because I am developing for iOS I want the smallest memory foot print possible.
The data is a large number (tens of thousands) of simple structures e,g,
‘MyVector’ is a class with 3 int members x,y, and z
MyVector3 a10000Vectors = new MyVector3[10000];
Does anyone know how an array of this kind would be stored in memory?
Is there a single block of memory with 30000 closely packed ints
or is it this plus another array of 10,000 pointers into 10,000 addresses in this block
or is it a list of 10,000 pointers and 10,000 separately allocated tiny blocks of memory
or something else?
Also does it make a difference if these are structs or classes? Do structs and classes have the same distinction in Unity that they do under .Net/Mono. Are structs values and classes reference values?
Is it smaller to have 3 separate arrays of int one for each components of the vectors?
Thanks in advance for any help.