No announcement yet.

Debugging Blueprint UI

  • Filter
  • Time
  • Show
Clear All
new posts

  • Debugging Blueprint UI

    I'm currently working on a new game and each level will have some amount of auto generation. Right now I'm trying to generate tile locations as this is a tile based game. This is the first game I've worked on that had any automated level generation and I am running into a problem. I need to create a 10x10 grid of tiles. I have created a tile UMG BP to use. I currently just trying to get the first line correct before adding more rows. I have a loop that runs 10 times and I use a starting location for the first tile and at the end of the loop I increment the x location to move the next tile to the left of the previous one. It works perfect except for the last tile which ends up with a different y location even though I am not changing that yet. I'm curious to find out how I can debug this kind of thing during runtime. I've set a breakpoint to confirm that each x location is correct and the y location is still the same for each of the 10 tiles. I know debugging Android apps there is an option to show the UI grid layout so you can see outlines of where everything is. What options are available to help me debug this issue? Or does anyone happen to know already what is going on?
    Here is the layout, in the loop I am adding the tiles to the highlighted canvas. Here is the loop where I actually place each tile. This is what the tiles look like after creating them. The last tile is way down and to the left when it should be right next to all the others.

  • #2
    Ok nevermind this I have found the error of my ways. I thought the off tile was the last one but its actually the first one. I was then able to see that I was resetting the y location to 0 after each loop. I was able to get it working. However I would still like to know what options there are for debugging the UI at runtime besides just placing breakpoints in the BP.