Call function from a widget component within blueprint actor.

I’ve created a blueprint actor and a widget. The widget is a component of the actor, parented to a cube, and set to screen space so it is always pointing the camera. Within this widget I have created a custom event called Shrink that changes the size of the widget using an animation.

The trouble is I can’t seem to call this function from inside my blueprint actor.

Here you can see the widget in the blueprint outliner. However, if I drag off from this widget I am unable to call the ‘Shrink’ event on it.

So next I tried creating a widget in the blueprint on beginplay, and setting it as a variable:


and this way I was able to call events from it, you can see SHRINK has printed:

However, the shrink animation did not affect the widget component of my blueprint, as it seems to be a separate part altogether. If I use the ‘add to viewport’ node after creating the widget, then I can see the shrink animation happen to it, but then the widget is just flat in the middle of my screen, and is not parented to the cube in world space.

Any help with this? I want to be able to call the animation event on the widget that is in world space/attached to the blueprint actor cube.

Far Cursor is the component. Get its widget first > Cast > callShrink


To clarify, the component creates the widget automatically, no need to create one manually. Essentially, we need to access the widget the component created, it would look close to: