Just to add: out of curiosity I set a print string to print the status of the Visibility(directly the widget visibility, not my bound variable)
It continues to print hidden even when it re-appears. Is this potentially a bug?
Just to add: out of curiosity I set a print string to print the status of the Visibility(directly the widget visibility, not my bound variable)
It continues to print hidden even when it re-appears. Is this potentially a bug?
Hi
I am having an issue with my widget visibility setting to visible automatically when the actor controlling the enum is destroyed.
I have a bind set to visibility in the designer, and have created the variable enum ESlateVisibility in my actor.
The actor successfully sets this variable to Visible on pawn sensing causing the health bar to show as intended.
I then have it coded so that when the actors health reaches 0, the ESlateVisibility bound to the widget is then set to hidden, and then the actor is destroyed.
I set a delay between setting the widget back to hidden and the actor being destroyed (just for debugging), and for reasons I can’t figure out it will stay hidden until the actor is destroyed. Once the actor is destroyed it will show the widget again automatically, even though the variable was set to hidden before being destroyed. I thought maybe pawnsensing was lingering so I put a do once in front of the show visibility, but that wasn’t it.
Does the ESlateVisibility variable automatically get set back to visible if the actor it’s stored in is destroyed or something?
Thank you for your time.
i think that when you destroy your actor, the references isn t working enymore, so the enums returns it s default value (0 ) which might be your visible value .
the best way is to destroy your widget before the actor, and rebuild it later if you need it
This solution worked, thank you very much!