x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Is there an event for when a widget enters the screen space

When an actor's widget component is set to screen space the tick is active when on screen and stops when the widget is no longer on the screen. This is how I want it so the tick isn't running when the widget is not on screen.

Is there an event or a way to trigger when the widget enters the screen (like what ever is triggering the tick to activated/deactivated)?

What I want is when the widget enters the screen for an event to fire so it will update any info that happened when the widget was off screen. I can achieve this with the tick or bindings, but I'm trying to optimize away from per frame changes on some things.

Product Version: UE 4.19
Tags:
more ▼

asked Mar 27 '18 at 04:39 AM in Rendering

avatar image

Sarlack
83 2 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi If I'm not mistaken, the Event Construct in the widget blueprint fires when the widget is added to viewport. There is an Event Destruct too which fires when the widget is removed from the viewport

more ▼

answered Mar 27 '18 at 07:21 AM

avatar image

lollalol
21 2 9

avatar image Sarlack Mar 27 '18 at 09:17 PM

Thanks for the reply

You are correct, when the actor is spawned, the Event Construct runs on the widget component. However when it goes "off screen" and then reappears onscreen it does not fire the event again. I know it is recalled if the widget is removed from the viewport and then re-added.

Note: the widget component is a health bar above the character set to screen space.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question