NATS is used to build a scalable, location-independent, and resilient augmented reality platform. NATS topics and subjects are used to distribute messages about avatars, props, and world state changes across devices and locations. Messages are serialized using MessagePack for fast serialization and to define the protocol. NATS is integrated into Unity using a services class to connect and publish/subscribe to handle messages asynchronously.