Saving values generated in game to use in prefabs.

I have made a random tiled background generator that generates a bidimensional array of ints, each one representing 1 tile of the background. Works great and generates good maps, but since some specific events must happen in specific tiles (and I don’t want them to be random), I must save those maps somewhere to know the location of those tiles beforehand and work with them.

Usually, when saving a prefab, the values of the variables are stored with it, but it doesnt seem to happen for variables which do no appear in the inspector.

The array is defined as:

public static int sizeY = 10000;
public static int sizeX = 7;
public int[,] map = new int[sizeX,sizeY];

¿Any ideas of how can I save this bidimensional array of ints for modification in the inspector?

You can instruct private fields to be serialized.

see http://unity3d.com/support/documentation/ScriptReference/SerializeField for how to do this.

Serialize the field or the class won’t get those variables to show. I think thats because I am using arrays of static size.

Is there any other way to create a bidimensional array of fixed size than to declare it with static int sizes?