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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Event Dispatcher in VR on Android doesn't work

Hey everyone!

I got a problem with firing event in BP. I have UMG widget for HUD with test button. I have click handler and event dispatcher. So on click I simply call test event.

In player controller I create widget in EventPlay and assign to event. When event appears I simply PrintDebug on screen.

alt text

In UMG Event Graph

alt text

It works perfectly in "Play In viewport", but if I run my app on Android phone with Google VR plugin set on then nothing printed on a screen from event handler. If I put Print in click handler before or after calling the dispathcer message from click handler will be printed. If I uncheck Google VR plugin and run on Android then everything works fine and I get all prints on a screen.

Can anybody help me with this problem?

Thanks in advance.

Product Version: UE 4.19
Tags:
umghud.jpg (78.2 kB)
more ▼

asked May 11 '18 at 08:41 AM in Blueprint Scripting

avatar image

megabegger
3 1 3

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

3 answers: sort voted first

Sorry I'm grasping at straws. Could be a race condition that doesn't occur due to the PC's faster processor. Try adding a Delay node of 3 seconds before the Bind Event node, and if it works after that (and you wait 3 seconds before you do any clicks) then it's probably a race condition.

more ▼

answered May 17 '18 at 09:08 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image megabegger May 17 '18 at 09:21 PM

Works!!! Amazing! Thanks a lot!

avatar image mightyenigma May 18 '18 at 05:20 PM

Great! Now you probably don't need that big of a Delay. I think it just needs to Tick once or twice so the Widget can finish being constructed before binding event dispatcher to it, or something like that.

avatar image megabegger May 18 '18 at 05:47 PM

Yes sure! But as I tested today this delay should be added before AddToViewport as mightyenigma adviced, otherwise it fails again.

avatar image megabegger May 18 '18 at 05:49 PM

Oh, both messages was yourth, sorry for referening you in wrong way.

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

When you test on Android, is it a dev build or a shipping build? PrintString nodes only put stuff on the screen for dev builds and the play from editor options. They're automatically removed when playing shipping builds as they're assumed to be for testing and debug only.

more ▼

answered May 16 '18 at 03:47 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image megabegger May 17 '18 at 06:44 AM

I know about dev build . You see, debug print works in the same build on Android with VR in button click handler and doesn't work in delegate which is called in this handler. Besides, I just simplified tests, I have actual action which changes visibilty of some object. So one way to do so is event dispatcher which is most useful but doesn't work in VR on Android, other way is direct function call of player or controller casting to specific class before.

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

Just a weird random idea, but try moving the nodes so the Bind Event gets executed before the Add to Viewport.

more ▼

answered May 17 '18 at 05:34 PM

avatar image

mightyenigma
3.8k 18 20 20

avatar image megabegger May 17 '18 at 06:35 PM

I've just tried, same result. Thanks.

(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