I have a UMG widget blueprint that is acting as a level selector. There are a lot of buttons (30 to be exact) that need to be placed on-screen, have their color changed, and set to enabled/disabled based on if the player has unlocked them.
I figured the best way to do this would be to spawn them with a for-loop.
It seems to be working; the buttons spawn; however, the buttons do not adopt the right size that I want them to (100x100), nor do they get moved into the right position. They stay at (0, 0) regardless of what I do.
http://i.stack.imgur.com/GesNb.png
The widgets in question are a custom widget with a button rendered as an image with a text block child:
http://i.stack.imgur.com/jpnqD.png
That is what is supposed to look like. As you can see in the first picture in the highlighted red box, I am calling two nodes, Set Position in Viewport, and Set Desired Size in Viewport, neither of which do anything. The first is supposed to space them out every 20px by increasing the x by 120 with every iteration of the loop. And the size seems to be completely ignored as well.
Here is the result:
http://i.stack.imgur.com/5Ps5n.png
As you can see, the buttons are all placed on top of each other, and the button is squished (more like cut off) to about 30px tall. I don’t think it’s a problem with the canvas panel, because if I manually add one to the panel, it looks like this:
http://i.stack.imgur.com/AbWYX.png
Dragging one in from the palette in the designer, it automatically has the proper size of 100x100. So why is the blueprint spawned button any different, and why are these nodes being ignored?
##Edit:
I can confirm it is not a problem with the particular canvas panel. I tried spawning them directly into the parent canvas and they still look all screwed up and only spawn in the top left corner.
Engine Version: 4.8.2 retail
OS: Win 8.1x64