IsUnitInDungeon
ESO Lua API function — used by 77 of the 3,030 addons we indexed (combined 4,383,990 downloads). Signature from the official ESOUIDocumentation.txt, API version 101050.
Official signature
IsUnitInDungeon(string unitTag)Returns: bool isInDungeon
Real usage — from LibZone
if not isInAnyDungeon then
isInAnyDungeon = (IsUnitInDungeon(playerVar) or GetMapContentType() == MAP_CONTENT_DUNGEON) or false
endShort excerpt from the shipping addon LibZone — 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 |
|---|---|
| LibZone | 1,937,031 |
| Wizard's Wardrobe | 481,038 |
| Info Panel | 368,274 |
| LibWorldEvents | 248,148 |
| Jack of all Trades - Automatic CP Respec | 194,328 |
| Thief Tools | 119,252 |