Hi, I was playing around with the UMG class in c++ and as you can create subclasses of actors, I was wondering if you could create a new widget element, like a custom progress bar.
I already have an idea on the logic behind this progress bar, but it would look very ugly in my widget class, so I want to know what class do I need to inherit from to be able to create this and possibly use it in the Widget Blueprints?
You should create a new C++ class that inherits from UUserWidget. Then, in UE, you create a new widget blueprint that inherits from your C++ class.
If you want to access elements from your widget blueprint in you C++ class, you should declare a property in you class and mark with with the BindWidget meta property specifier. The name of the property and the name of the element in your widget blueprint must match. (You’ll get a warning otherwise anyway.)
Hopefully this should get your started. Cheers!
Nevermind I found what I was looking for. Looking at the UImage header i found out it is a child of the UWidget class, that was my goal. Thanks anyway.