'Get User Widget Object' reference not working from another actor component?

Hi! I’ve added a simple health bar to my enemy character and am trying to put all the enemy logic in an ‘enemy’ Blueprint Actor Component that can be added easily to new characters.

My problem is that when I try to reference (and cast to) the User Widget Object from the main enemy BP it works fine (see below):

However, when I try to move that logic to my ‘enemy’ BP Actor Component, it fails to ‘Get User Widget Object’. It will print the correct Owner and Component by Class, but can’t seem to then find the User Widget Object?

Any help would be greatly appreciated!! Thanks!

When do you call it? Chances are this comp initialises before the widget component is ready. It may exist but has yet to instatiate its widget.

Thanks so much, I think this fixed it!

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