The difference between UWidgetComponent and UWidget is that UWidget is used to derive child classes that get used to expose Slate functionality in the UMG designer and can’t be used in game. While UWidgetComponent is used to render the UUserWidget (Widget BP) on screen or in the world.
I think you might be missing the Category metadata for your widgetComponent variable declaration and you might also need to add U in front of DialogueComponents as that is what UHT requires and UCLASS() above it (it might also be missing more metadata).
Thanks, i’m glad you mentioned UUserWidget, that’s exactly what i wanted to compare the UWidgetComponent with. I’ll check out what you said abotu the Category when i get home
P.S I edited my question to include these 2 details.
I’ve revamped my question, I can see how you would have thought Category might help… I found that without declaring it, it will not appear in the listed add components, hopefully my new images make you understand better what I mean. Thanks for the help! Any ideas?
I was able to repro this behaviour with your example, and have not yet been able to pin down a cause yet. I’ll investigate some more and let you know.
Unfortunately this does not change anything (EDIT) Although not the actual issue, I think it’s key to keep this here and remind people it is required. So thank you for mentioning it.
Ah, well, the point was that the UDialogueComponentWrapper was simply to be a structure that holds details of the various bits and bobs required for dialogue… and yet can still itself be instanced. If you check through my question revisions you’ll see why I ended up at that place to try and clarify the question. But you can now see my “answer” that does indeed use CreateDefaultSubobject to instantiate a USceneComponent.