Using an uniform grid to space various buttons within an UMG widget (this widget will be a sub-widget for another “main widget”). However, when any of the buttons are clicked, it causes the editor / PIE to crash. I added an “exit” button that currently works in another widget / layout, and it works fine.
Here are some screenshots (the exit button works fine in another widget w/o uniform grid):
I checked a “normal” button within the uniform grid, and it did not crash the editor. The “modular” buttons are, however. One other thing to note, is that when the PIE window crashes, it does something weird with the mouse. Left button allows you to click on objects within the project, but not move them. The Right mouse button does not move through a graph, but instead comes up with the “wrap with” menu; almost like it’s registering that your hovering over a variable. I’ll include screenshots of the way I have the buttons setup.
The Buttons are made of 2 parts. The first is the “background”, which has a A Button (no functionality), with Text as a child (that’s why I had to use a button, image cannot have a child). These are wrapped with a size box, which in turn, is wrapped with a canvas panel. There are 2 variants, but both are the same, just one is square, one is rectangular (as you can see in the first screenshots). Both are set to hit test invisible.
The next step, is to take the above, and to turn it into the button that has functionality. Pretty basic, it has a normal button with the the widget from above as a child. The normal button has an opacity of 0 so it cannot be seen, with the child as hit test invisible. The button has click events.
Step 3: The Uniform Grid Widget
This is actually supposed to be a child widget for another menu, however, iterate and test, right? After Step 2 from above, the next step was to have a these buttons placed in a uniform grid panel. At this point, the game started crashing.
While this particular issue isn’t “fixed” per se, I decided to make a bit more sane approach and use an event dispatcher to capture clicks and got rid of the “nested” buttons, which reduced the amount of widgets I had to create. Anyways, have getting rid of the nested buttons, the grid panels work without crashing the editor.