I Have a hexagonal grid created at runtime, the size of the grid is determined by the size of the map selected. I have a second orthographic camera facing down (you guessed it, for a mini map). I need the camera to snap to the size of the grid, IE you will see the entire hexagonal grid in the viewport, and the viewport ends where the grid ends.
The viewport will be a fixed height and width, lets say for arguement sake it is 100 x 100, I have this part sorted, but it currently displays either part of the grid, or displays it all but has space between the edge of the grid and the edge of the viewport.
So effectively I am asking how to script a camera’s view width and height to match the width and height of the grid that is created at runtime.
Cheers for your help.