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 desired position (children will be built using relative indexing to the parent (0, 0))
  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)

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

When you make the Prefab

  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

![] (https://i.gyazo.com/aa339b33badf5a4dc6890af9d493407a.png)

Clone this wiki locally