Can't set visibility on 3d widget BP's widget.

So I have an actor BP which has a 3d widget BP component, and I’m trying to set certain widgets’ visibility of that 3d widget BP.

To set the visibility I have a custom event in the 3d widget BP that looks like this:

In the event graph I just drag out the Widget component but I can’t access this custom event at all (I even tried casting to its class in desperation). None of the widget variables are accessible either which might’ve been more expected.

How should I do this?

My only solution that I can think of is to create one 3d widget component for each element I’d like to hide/show and switch between, in my case, 4 different components. Not quite as nice as using custom events (or whatever I should be using).

I think this is still experimental so maybe this isn’t done yet but it’d be great to hear either way.

Thank you.

Are the widget part of a another BP, or are they separate BPs all together.

Example Character with health 3d widget, or Character BP, and a Health BP, Mana BP…

It’s an actor BP which has a 3d widget component, so basically I just went into my actor’s viewport and added a ‘widget’ component there, and set it to my 3d widget class. Then my widget component shows up as a variable in the BP which I’m trying to use to fire off a custom event (which was created in the 3d widget’s graph).

Cheers!

I might’ve not been very clear I realize, basically all I’m interested in is if I can access a 3d widget’s custom events if that 3d widget is a ‘widget’ component of an actor.

If not it’d be great to hear if there’s another way, and if there’s no way at all that’d be very good to know as well. Thanks!

If I get you right, yes. The widget is a BP itself, so you should reference the widget, not the widget through the character.

Edit, you have got the widget parts variable set to yes in the widget so you can reference them?

12253d89cbc446884871d6127631d5e320b8ab03.jpeg

Yup, my variables are set like that, although I’m actually trying to get to the custom event (which in turn is accessing the variables)… but I was looking for that as well, and I could just take the custom event out of the widget into the actor BP instead.

So when you say I should reference the widget, not the widget through the character (my widget is a component of an actor BP btw, not a character class BP which probably doesn’t matter), what exactly do you mean? I’m just dragging out the ‘widget’ variable - which appears once the 3d widget component is created - and trying to get the custom event/variables from that. So I’m not using the actor BP to get to the widget as I’m already inside the actor BP.

Thank you so much for the help!

Something like this

419c093ad860de008ee72fe09a52a09a5c0bdda0.jpeg

Reference like this

46ae69505e61187e86e2d8db22211cd7021deafc.jpeg

Ok but that way you’re constructing a widget on the fly, I have mine pre-made and can’t for the life of me access its functions and variables. Here’s a pic of what I’m trying to do:

So my widget is there already, I’ve tried grabbing the widget ref right away and also getting it as a child component but neither will allow me to fire a custom event or access variables.

Maybe it’s not supported? I could probably do what you’re suggesting but I’d still prefer to do it without constructing it on the fly. Plus now I’m really interested in hearing if it’s possible at all as well. :slight_smile:

Big thanks for the help!

Oh… I think what you’re doing won’t work for a 3d widget (aka widget component) btw. It will work for a normal widget though.

I’ve realized creating a widget component in blueprint doesn’t exist, or it’s very well hidden.

And I guess with that realization I’ve realized I’m barking up the wrong tree here and will give up on these. It is experimental after all.

Thank you again for your and effort, and if someone realizes my assumptions are wrong I’d be very eager to hear.

Hello. I hope this help:

The way I do it is instead of creating custom events inside the widget I create variables elsewhere (like in the GameMode blueprint or in the Controller blueprint). Then I access this variables using Event Tick inside the widget (with GetPlayerController and casting to my custom controller for example or with GetGameMode and casting to my custom GameMode blueprint, usually through a function for convenience). So when I want something to happen -like start or stop an animation- I just change the variables and the widget will do the rest on its own.

You can also set visibility of 3D widgets inside the blueprint actor as with any regular component.

That’s pretty neat actually, although I try to stay away from as many Event Ticks as possible but what you’re doing doesn’t sound like it’d take up many cycles.

Setting vis of the entire widget wouldn’t work very well for me in this case (would’ve worked, but now I’m just creating billboards instead and have ok control that way) but I’ll keep that in mind!

Cheers!

Yes. I haven’t seen any performance issues with Event Ticks inside widgets, at least in this case, so I’m OK with it for now. Of course, in the future it would be nice to have access to 3D widget events as when you use them on the Viewport.

Another possibility could be to use the events in the details panel of the 3D widget, though I haven’t tried it yet.

You can get user widget from your component and* change opacity* of that. Do not forget to set visibility to *collapsed *if you hide widget at all)