UDP is not reliable, so there is no notification for missing packets. Your code needs to decide when a packet is missing -maybe after a certain lapse of time-, and request it again from the sender, thereby duplicating what TCP does, but most likely much slower.
As an aside, it has already been pointed out that the underlying reason for using UDP instead if TCP is highly likely to be flawed;
you should direct whoever told you otherwise to these discussions.