ESODecoded

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 Updatedits ESOUI page; the code belongs to its author. Shown because documentation without a working example is half a reference.

Most-downloaded addons using it

AddonTotal downloads
RaidNotifier Updated2,789,746
Provision's TeamFormation : Teammate Radar1,506,270
Kill Counter577,202
Dressing Room for Stonethorn527,263
OdySupportIcons - Group Role Icons & More484,590
Group Loot Notifier363,639