🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Widget Help

Started by
0 comments, last by MagForceSeven 5 years ago

I posted this problem to Epic's Answerhub, but thought I might post here as well.

I'm having some difficulty with the differences between widgets and user widgets. I have a custom control that I would like to both be able to place through the designer and create/place dynamically.

If I make the control a Widget, I can place it through the designer but can't create it dynamically (the Create Widget node seems to require a UserWidget type as does the native CreateNewWidget). If I make the control a UserWidget, I can create it dynamically but it no longer displays as available in the UMG palette to place through the designer.

A possible work around is to make it a widget and create a user widget that wraps but that seems, quite honestly, dumb. In that case, either every access to the control must break the encapsulation of the wrapping UserWidget or the UserWidget must duplicate the control's API as boiler plate pass through functions. Neither is a path I feel particularly happy with. My temporary solution is to have my custom control be a user widget and dynamically spawn/position it during the pre-construct event as a replacement for placement in the designer, but it kind of defeats the purpose of having the designer.

--Russell Aasland
--Lead Gameplay Engineer
--Firaxis Games

This topic is closed to new replies.

Advertisement