Help Debugging Maze Generator: MazeGrid Not Updating, Walls Only Spawn

Hey everyone, I could use some help debugging my maze generator BP (BP_MazeGenerator).

The setup:

  • MazeGrid should mark paths as 1 and walls as 0.
  • GenerateMaze is supposed to carve paths by setting cells to 1.
  • SpawnMazeMeshes then spawns floors on path cells (1) and walls where it’s 0.

The issue:
MazeGrid stays all zeros → walls spawn everywhere, no floors appear. The generator terminates immediately because GetUnvisitedNeighbors returns no neighbors from the start, so the stack empties right away.

I think the bug is either in the logic that updates MazeGrid or the neighbor-checking code. I added print statements, but still stuck. If anyone could take a look at my Blueprints, I’d appreciate it:

What is causing the issue and how can I fix it?

  1. Why you InitializeMaze again in GenerateMaze
  2. Get Grid Index is always zero because in GenerateMaze you set CurrentX and CurrentY zero. Even Maze Width x 0 is 0.

Try to add delay. Loop take times

Thank you! I will take a look and let you know :slight_smile: