Grids 2.2 was accepted in the Asset Store last week.
We fixed some small bugs and warnings.
In the previous update we made our division operator consistent with that of Unity’s, but we did not change the mod operator to match! In this update, we do this. We also deprecated the old Div and Mod methods, and added two versions for each (one for floor division, and one for trunc division). Floor division (where (-1)/2 = -1) is the one you should find most useful in grid algorithms. Trunc division (where (-1)/2 = 0) is a method that implement ts the same behaviour as the operator. In all cases, mod has been implemented so that (x div n)n + (x mod n) = x.
The most interesting new features involve new methods and nodes for 3D shapes. We added layered shapes which allows you to use 2D shapes (either the same, or different ones) as layers of a 3D grid. We also added a new node that creates a 3D grid shape from 2D orthographic projections (the shapes in the image above was created with this node from only 4 different 2D shapes).
We also added a new “graph shape node” that allows you to use one shape graph in another. This makes it easier to construct complicated shapes.
We also added a new round map (both in code and to grid builders) called HexBlockRound, which is suitable to use for layered hex grids.
Finally, we also added inspectable versions of Interval, GridInterval, GridRect and GridBounds so these cfan be used in the inspector.