World-Space Widgets with Inherited Functions for Different Characters

Hi everyone,

I’m currently working on a project that involves multiple characters, each with their own unique abilities. I want to display a widget in world space when these characters attack, and this widget should perform different actions based on the character and ability.

Initially, I considered creating a base widget class with a function that I could override in child widgets for each ability. However, after some research, I found that UMG widgets don’t support inheritance the same way other blueprints do, which has left me a bit confused.

I’m seeking a clean and maintainable way for the characters to call widget functions based on the context without having to cast for different ones.

Any suggestions would be greatly appreciated!

Thanks a lot!

Hi there,
I would suggest you use a common interface to communicate with your widgets.

1 Like

I couldn’t find it for some reason, this is what I was looking for!

Thanks!

Oh, it is in the Class Settings of the UserWidget:

1 Like