WhenMT came out with bridge vlan-filtering, it seemed that the old /interface ethernet switch subtree would be phased out sooner or later … currently it seems to be later … so the old way is still more resource-friendly way of doing it as most of hardware doesn’t HW offload the new way (it’s done entirely in CPU, only CRS3xx series does it in hardware).
Anyway, there’s a nice tutorial about doing it modern way.
Your use case would look like this:
/interface bridge
add bridge=bridge vlan-filtering=yes
/interface bridge port
add bridge=bridge interface=etherX pvid=10 # port towards unifi
add bridge=bridge interface=etherY # trunk port towards core router
/interface bridge vlan
add bridge=bridge tagged=bridge,etherY untagged=etherX vlan-ids=10
add bridge=bridge tagged=bridge,etherX,etherY vlan-ids=20
add bridge=bridge tagged=bridge,etherX,etherY vlan-ids=30
/interface vlan
add interface=bridge name=vlan10 vlan-id=10
You would then use interface vlan10 for communication with management of unifi (bind DHCP server or whatever needed). If RB3011 is actual core router, then you’d create vlan interfaces for VLANs 20 and 30, set IP addresses and let router route between all those vlan interfaces (and internet).