UE5-MazeGenerator-Plugin icon indicating copy to clipboard operation
UE5-MazeGenerator-Plugin copied to clipboard

Generate Mazes with various algorithms in Unreal Engine

UE5 Maze Generator Plugin

Table of Contents

  • UE5 Maze Generator Plugin
    • Table of Contents
    • About
    • Enable Plugin
    • Quick Start
    • Generation Algorithms
    • Limitations
    • Notes

About

This is a plugin for UE5 that allows you to create various mazes using the following parameters:

  • Size
  • Seed
  • Generation algorithm

This plugin supports pathfinding.


Enable Plugin

Before enabling plugin ensure you have installed it in engine of appropriate version inside Epic Games launcher:


Open plugins list Edit->Plugins:


Search for MazeGenerator in search box and check the checkbox against MazeGenerator plugin. Then restart your project.


Make sure plugins are shown in content browser. You can toggle visibility as follows:

Quick Start

To create your first maze create Blueprint class based on Maze class:


In the newly created Blueprint class select Class Defaults and play with available parameters:

Note: size can be specified only on instances(i.e. on actors placed on level)

Set Floor and Wall Static Meshes under Details panel.


Instantiate Maze by dragging Blueprint into level and play with parameters:

Generation Algorithms

Limitations

Unfortunately, Unreal Engine Reflection System doesn't support 2D arrays, so legally they can't be exposed to the editor.

If you want to work directly with the maze grid or path, inherit from the Maze class and expand the functionality directly using C++.

Notes

  • Generated mazes are perfect
  • Under the plugin content folder is an example of a Maze Blueprint with some logic
  • Instances of Maze have Randomize button
  • Source code of the plugin can be found under Plugins/MazeGenerator/Source/MazeGenerator