GetUnitZone
ESO Lua API function — used by 108 of the 3,030 addons we indexed (combined 9,651,036 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetUnitZone(string unitTag)Returns: string zoneName
Real usage — from RaidNotifier Updated
-- Not using GetMapName() because that changes while looking at the map
self.raidZoneId = RaidZones[GetUnitZone("player")]
Short excerpt from the shipping addon RaidNotifier Updated — its ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.
Most-downloaded addons using it
| Addon | Total downloads |
|---|---|
| RaidNotifier Updated | 2,789,746 |
| Provision's TeamFormation : Teammate Radar | 1,506,270 |
| Kill Counter | 577,202 |
| Dressing Room for Stonethorn | 527,263 |
| OdySupportIcons - Group Role Icons & More | 484,590 |
| Group Loot Notifier | 363,639 |