Skip to content

BaseFloorGenerator

Simon Su edited this page Sep 28, 2018 · 7 revisions

Can automatically generate an X by Y floor layout with transparent colliders which prevents GameObject (Player) from falling off the map.

  1. Must have an IsoSorting setup in the scene
  2. Add an empty GameObject (parent)
  3. Add BaseFloorGenerator script as a component to this game object
  4. Move the parent to the desired position (children will be built using relative indexing to the parent (0, 0), so SizeX = 0, SizeZ = 0 will actually build a single block at the parent's location as it can do both positive and negative indexing)
  5. Drag a prefab for the material of the floor into the Prefab field
  6. Edit the size of the floor and uncheck barriers if transparent colliders are not required
  7. Build object and rebuild when you change any fields in the editor for IsoTransform or BaseFloorGenerator components to update the scene (can test out different materials, sizes and positions)

When you make the Prefab

If you want to use the Abstract Tiles package - it is in Isometric orientation whereas the Kenney package runs in Dimetric

  1. Change Scaling for x to 1.04
  2. Change Scaling for y to 0.90
  3. Change Scaling for z to 1
  4. Add IsoCollider
  5. For Kenney package, don't change the scaling and add IsoCollider

Clone this wiki locally