I’ve had to do this at a job recently that had to monitor access to sensitive offices and vaccines. This works internally (with a double-NAT) or over WAN with a change or two

Essentially, the steps are:

1) Setup camera with static, local IP

2) Login to camera and configure NVR IP as the WAN IP of the UDM Pro / NVR

3) Login to UDM Pro and configure WAN Local Firewall Rule to allow all traffic from static IP you set in Step 1 (if going over WAN, use WAN IP of location with Ubiquiti camera)

4) Login to Protect app in UDM Pro, add camera