Best way to make GUI block onPointerObservable()


I’m looking for a way to block events coming to onPointerObservable() when the pointer is interacting with GUI elements.

Is there a way to do a hit test for POINTERDOWN or something simpler than adding an on onPointerEnter/onPointerOut to every GUI control?

I tried onControlPickedObservable however that’s called after the scene one.

Any tips?

You can set control.blockPointers=true:)