Why doesn't Unity iPhone support 4D arrays?

If I try to initialise anything more than 3D arrays with an iPhone target, I get this exception:

ExecutionEngineException: Attempting to JIT compile method ‘TerrainData:.ctor ()’ while running with --aot-only.

for a simple array declaration:

someArray = new int[3,3,3,3];

Can anyone confirm that this is the case? If so, why?

While I can’t tell you why it would work with a 3 element array, but not with a 4 element array. Have you tried using a generic list to manage your data?

So declare your struct or class with 4 integer fields, then use all the generic functionality to search or sort them.