GetUnitRace
ESO Lua API function — used by 34 of the 3,030 addons we indexed (combined 2,449,961 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
GetUnitRace(string unitTag)Returns: string race
Real usage — from Foundry Tactical Combat (FTC)
FTC.Player.name = GetUnitName('player')
FTC.Player.race = GetUnitRace('player')
FTC.Player.class = GetUnitClass('player')Short excerpt from the shipping addon Foundry Tactical Combat (FTC) — 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 |
|---|---|
| Foundry Tactical Combat (FTC) | 1,097,601 |
| Wykkyd Toolbar | 567,448 |
| Magic Carpet | 163,646 |
| More Target Information | 83,959 |
| Tinydog's Crafting Calculator | 76,858 |
| Khajiit Speak | 75,744 |