I’m trying to minimise my games load time by pre-calculating arrays that hold vector3 data.
What I’d like to do is have these arrays calculated then stored against gameobject via the gui.
Here’s some pseudo code:
public override void OnInspectorGUI()
{
[INDENT]target.myCalculationClass = target.Calculate();[/INDENT]
}
Now… Calculate() returns an array of this class:
public class MyCalculation {
[INDENT]Vector3[] data;[/INDENT]
}
So far I’m able to get all of this work in the edtior and I can verify that the data is being calculated and shown in the gui but when I load the game the target.myCalculationClass becomes null. Anyone got any ideas?
Thanks but I’ve tried adding the System.Serializable attribute but it doesn’t help. I’m guessing it might be a limitation since Vector3[,]'s don’t work either.