Jump to content
  • Advertisement
Sign in to follow this  

Unreal Widget Help

Recommended Posts

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.

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!