Major bug with UMG not drawing correctly outside of editor viewport.

For some reason on all of our package game tests and any window that isn’t inside the editor Viewport, our UMG isn’t drawing correctly, the issue is inconsistent, sometimes some elements will draw sometimes they won’t.

Our buttons are all based on the same material, though I can’t understand why this would be a problem. Anybody else experienced this and/or have a fix? In the screenshot below, we have a Client in the editor viewport, and a smaller server window in the foreground. Both UI’s should be identical, but you can see they aren’t drawing. There is nothing in the material that causes the button to be transparent ever, and my worry is that this is occurring in packaged games as well as any non-editor viewport.

I would put this on answerhub but it takes too long to get an answer there atm.

96a22811a9ec27176a2d39b8b8bb996657a7f0de.jpeg

Panel Amp 2, does have the background which is kind of weird. What’s different about that widget?

I thought that… Nothing at all, the entire UI is actually inside one widget.

Check the anchoring - also make sure you test in multiple resolutions in the editor to help with this stuff. You may need to wrap elements in ‘Scale Boxes’.

How are your textures configured for the backgrounds? Can you send me a project that reproduces the issue, also do you have the logs from cooking the game? There may be some errors being logged.

Here’s a newer screenshot, same textures and materials. The level was loaded inside a Shipping build of the game this time. (Note: I also had to add a delay for the Widget Creation, because otherwise the game crashes due to the Garbage Collection bug)

Here are the import settings for the texture (RGB Packed), and a screenshot of the system in UMG. The buttons are actually borders, not buttons. Buttons on the top are overlayed but are set to be completely transparent.

One interesting thing that i don’t think should affect it, in order to get the material to look right, we initially set the ‘Draw As’ value to ‘Border’ and changed the Margin to 0.49, then changed back to Image again.

This didn’t make any visible different apart from in the center of the border. The idea was we wanted the edges of the buttons to look identical, but the fill of the button to scale with the size. This would be much easier if screen-position based UV’s were supported by UMG, but they don’t seem to be.

This project is currently well over 2GB in size, if you absolutely need it to fix the issue I can try to send you a slimmed down copy (though it will have to stay private).

What happens if instead of material instances you just use the texture directly?

The setting you want is Box. That’s the 9-scale that you can set a margin on that stays constant. So like a box with a 0.25 margin on an image that’s 100x100 pixels will be a constant border of 25 pixels at the corners, and the center will be stretched, and the vertical and horizontal areas will be stretched along their axis, but locked at 25 pixels on their opposite axis.

Thanks, I’ll use Box from now on, that seems like a better approach. I applied the Texture to one of the buttons, and almost all of the Materials that reference that texture in the same widget started drawing properly. Any border, image or button that uses a different material still doesn’t always load properly. Thing is, there seems to be an element of randomness to it.

Using Textures directly isn’t really an options for us though even as a temporary work-around, we’re heavily reliant on the additional functionality we get using materials for better user feedback.

Could it possibly be a loading issue? I’ve even delayed the creation of the widget by a second or two, and still not getting much luck. Cheers!

Maybe it’s a reference problem, what happens if you change the texture compression to just be world, or whatever the default is. Do they start loading properly? Maybe it’s some weird nuance about how textures with that setting are cooked.

Tried World, still nothing. Even without cooking the content, the issue still persists in editor in the new client window when I play with two players.

Think you could get it to reproduce in one of the starter templates?

I’ll give it a go sometime in the next 24 hours and send you a DL link :slight_smile:

EDIT: Just to add to this, I’ve got another project I’m working on that has a reticle using a Material, that too doesn’t load on external windows, or packaged games.

Hi Nick, sorry for the delay.

I’ve attached a link to a .zip file containing a really simple project, and a video showing the issue happening in this project. It should be fairly self-explanatory, I’ve copied the material network and texture from my other project. To test it, just use the settings in the following video and you’ll be able to see the issue.

I have also packaged the game as a development build. If you re-create the Shortcuts I’ve included, you can see that as soon as you fire up a Server or a Client, the Materials are still not present.

Video For PIE:- YouTube
Assets / Project:
https://drive.google.com/file/d/0B_FT-hzi26QkZkNDVkxvOGtUdTA/view?usp=sharing

Answerhub Post:
https://answers.unrealengine.com/questions/172554/reprotest-included-umg-materials-not-displaying-in.html

BTW, no idea why it’s a 70Mb download, there’s like 6 assets in the whole project :stuck_out_tongue:

I’ve seen this before in a projects, even a very simple unlit material applied to a border - with no textures, looks fine in PIE, but wouldn’t appear in standalone game.

I PM’d Nick btw, they’re looking into it :slight_smile: