You would need your APs to support VLANs, and extend a trunk to them. Then operate a different SSID per VLAN/broadcast domain, or use 802.1x for VLAN assignment.
Unifi are wireless Access Points (only)
Mesh is an inaccurate term for how they work, by the way(unless you put non-factory firmware on them). They CAN be configured in a "single-leaf" wireless uplink mode, but should not be (it cuts throughput by at least half .vs. wiring them all.) You seem to be saying they are all wired into a switch, so there is no "mesh" going on, simply provision of the SSID over multiple devices.
A common problem (not clear from the level of detail in your question) is people deploying them with WAY too much power and overloading the input stages of the client devices (especially if they get the UAP-LR because it's advertised to have "more range") - in MANY cases, performance is improved by turning power down. The link does not work unless the radio can also hear the client device, and UAP-LRs have a VERY small field of appropriate application.
That's one fork of possible issues/resolutions. The other is:
A "home type router/switch" is a wireless access point, a switch, and a router, typically including a DHCP server, DNS Server, etc.
So, if it works better with a "home-type router/switch" you might need a device to play the role of "router" though in fact your issue may be more DHCP/DNS than "actual routing." I'd suggest pfSense for the role, but there are many possible options.
Best Answer
That depends. Are you using a single SSID and comfortable with the WAP management address on the same network as the wireless users? If so, an access interface should work. If you want to offer multiple SSIDs, or you want to manage the WAP at an address on a different network, then you need to connect the WAP to a trunk interface.
A WAP is a bridge, like a switch. Unlike a switch, a WAP is a translating bridge; it must translate the layer-2 protocols between ethernet (IEEE 802.3) and Wi-Fi (IEEE 802.11). Those two protocols use different frames, and the WAP must convert them. In the old days, we had translating bridges for ethernet and token ring (IEEE 802.5). An ethernet switch is a transparent bridge.