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.

In UMG Event Graph

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.

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.

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.

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

I’ve just tried, same result. Thanks.

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.

Works!!! Amazing! Thanks a lot!

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.

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

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