Placing a grid
Navigate to /Prefabs/WholeGrids, drag in one of the premade grids and adjust the General settings such as height, width and cellSize.
Best to keep the cellSize at 1 = 1 metre. However, everything will adjust if you decide to change it.
If you want the grid to be above some existing terrain, move the grid on the Y-axis slightly above. A value of 0.015 works well.
You can use as many grids as you want, 1, 10 or 50, it’s up to you.
There is no ‘Hard’ limit on width or height, I have tested up to 90,000 cells with 300 height and 300 width which starts to slow down on my mid-range machine.
Caution to increasing grids and cells quantity will certainly affect performance after certain thresholds dependent on your hardware.
Adding prefab modules
Navigate to /Prefabs and drag in a GridSelector, ObjectPlacer, and ObjectRemover. You should only have one of each of these.
You can also drag in an ObjectSelector and GridObjectOptions if you like.
Back in /Prefabs, drag in a SelectObjectBtn and RemoveModeBtn.
This will create a canvas so you can move the buttons somewhere convenient.
By default, the SelectObjectBtn has a demo prefab assigned but feel free to change it to another object you would like to place. Please note there is no scaling done to prefabs, so the models will have to match the grid size.
Also under SelectObject you can now set the rough size of your objects. Setting this up is easy and only requires you know the size and direction of your object. Check the demo scenes packaged with the project to get an idea on how to set this up.
Make sure to add colliders to placeable objects.
That’s it! Hit play and you should be able to move, click on an object and place it down on the grid. You can also click on an object to select it, and move it around after placing it down.
You can also hit the removeMode button to highlight and delete objects.
Both placing and deleting objects is done with the left mouse button and cancelling either is done with either the right mouse button or escape.
There are many things to customise in Grid Builder 2. The best possible way of trying out most of the features is through the demonstration scenes.
Almost every scene uses a differerent combination of objects and grids to show all of the possibilities of Grid Builder 2.