Need help with assigning game objects to variable

made an array of a custom class and i want to assign a prefab to class variable so assigning from another(inspector exposed) variable. relvent Code:

public class ChunkData  {
	public string BiomeName			="Forest";
	public GameObject landType		=null;
	public GameObject[] NatureTypes	=null;//list of nature placeables
	public GameObject[] ObjList 	=null;//list if generated objects
	public Object[] LoadedList;	
	public float worldX				=0;//location in world in unity units
	public float worldZ				=0;//location in world in unity units
	public int objDensity			=100;	
}



public class LandGenerator3 : MonoBehaviour {
	public GameObject LandMesh 		=null;//land object(for now)

void Start () {
		ChunkList = new ChunkData[worldSizeX, worldSizeZ];

void FillChunks(){
		for (int x=0; x < worldSizeX; x++) {
			for (int z=0; z < worldSizeZ; z++) {
				ChunkList [x, z].landType 		= LandMesh ;**<<where i get error**
				ChunkList [x, z].NatureTypes 	= NatureList;
				ChunkList [x, z].objDensity 	= objDensity;
				ChunkList [x, z].worldX 		= x * 50;
				ChunkList [x, z].worldZ 		= z * 50;
				CreateChunk(ChunkList[x,z],x,z);
				print ("Chunk Filled?");
			}
		}
	
	}

public GameObject myPrefab;

Drag/Drop prefab into it in Editor, or assign GObj reference in another script to thisScript.myPrefab

Figure it out( a way anyway) you have to “reserve memory” for your data from your class, at least arrays and the like. for example:

void InitChunks(){
		for (int x=0; x < worldSizeX; x++) {
			for (int z=0; z < worldSizeZ; z++) {
				ChunkList[x,z]				= new ChunkData();
				ChunkList[x,z].landType 	= new GameObject("land");
				ChunkList[x,z].NatureTypes 	= new GameObject[10];
				ChunkList[x,z].ObjList		= new GameObject[objDensity];
				ChunkList[x,z].LoadedList	= new Object[objDensity];
				ChunkList[x,z].ObjLoc		= new Vector3[objDensity];
			}
		}
	}