Hi.
I am attempting to generate a grid and storing the individual Tiles in a 2 dimensional array. But as soon as I am attempting to access the the tiles in the array I get a "null reference exception" Bellow I have included some of the code, if someone could tell me what I'm doing wrong.
Strip down grid generation script
Object reference not set when referencing it and adding to array
I am attempting to generate a grid and storing the individual Tiles in a 2 dimensional array. But as soon as I am attempting to access the the tiles in the array I get a "null reference exception" Bellow I have included some of the code, if someone could tell me what I'm doing wrong.
Strip down grid generation script
Code (CSharp):
- {
- public Tile[,] Map;
- public int gridWidthInHexes = 10;
- public int gridHeightInHexes = 10;
- private void...