We provide a new axiomatic framework, inspired by the work of Ol'shanskii, to describe explicitly certain irreducible unitary representations of second-countable non-discrete unimodular totally disconnected locally compact groups. We show that this setup applies to various families of automorphism groups of locally finite semiregular trees and right-angled buildings.