How can I get the reference of the instance of the class that I set in User Interface -> Widget Class in the Widget Component?

Hi!

Why I get the warning “‘WBP Planetarium Menu’ does not inherit from ‘Widget Component’ ( Cast To WBP_PlanetariumMenu would always fail).”? I know why, the problem is that I don’t how to do it. I have used WBP_PlanetariumMenu as User Interface → Widget Class.

How can I get the reference of the WBP_PlanetariumMenu instance that I set in User Interface → Widget Class in the Widget Component?

Thank you.

Hey @ViaCognita

You get a warning cause you’re trying to cast a WidgetComponent to a UserWidget, which is in no way compatible.

You just need to call “Get Widget” to get the actual created widget within the component.

As you can see on the screenshot, the cast from “Get Widget” is fine.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.