QuadMaze

class in FinixMakesGames.MazeGenerator / Inherits from:Maze

Description

A Unity component capable of creating rectangular mazes.

Properties

PropertyDescription
seedA string value used to determine the layout of a maze, leaving it empty will generate a random seed
cellSizeThe number of units that a single cell will ocupy in a scene.
rowsThe number of Cells created along the local z-axis.
collumnsThe number of Cells created along the local x-axis.
generationTypeAn Enum used to determine whether the maze will be created with prefab tiles, or with simple walls and pillars
algorithmThe algorithm used to create the Maze layout
------
corridorObjectsA list of prefabs used in when generating the prefab with tiles, will select a random tile from this list every time it encounters a Cell with a corridor layout.
cornerObjectsA list of prefabs used in when generating the prefab with tiles, will select a random tile from this list every time it encounters a Cell with a corner layout.
intersectionObjectsA list of prefabs used in when generating the prefab with tiles, will select a random tile from this list every time it encounters a Cell with a intersection/t-section layout.
crossroadObjectsA list of prefabs used in when generating the prefab with tiles, will select a random tile from this list every time it encounters a Cell with a crossroad/4-way layout.
deadEndObjectsA list of prefabs used in when generating the prefab with tiles, will select a random tile from this list every time it encounters a Cell with deadend.
------ These can be set to empty if the maze is being generated with the walls and pillars
wallPrefabA prefab used as the walls when generating the maze with the walls and pillars method. Note: this prefab will be stretched to fit the cellSize.
pilarPrefabA prefab used as the pillar when generating the maze with the walls and pillars method.
------These can be set to empty if the maze is being generated with the tile prefabs
generateOnStartIf set to true, it will generate a new maze every time the scene loads on the Start() frame.
------
gridA QuadGrid class with the maze layout information
uniqueTilesA dictionary of Cells and Prefabs used for Modifiers and the prefab tiles method. When detecting a cell contained in the dictionary it will spawn the corresponding prefab instead of a random one.

Public Methods

MethodDescription
CreateMazeGenerates the maze
ResetMazeDestroys every child object of this maze object