pollOrNull

Returns the next event from the queue, or null when the queue is empty.

Events that PlatformEvent does not model are discarded, so null means no event of interest is waiting. Call it in a loop until it returns null, once per frame.