FANDOM


Get the race of a unit.

local race = UnitRace(unit)

Parameter Edit

unit
String - the UnitID (e.g. "player", "target", "party1", "raid1", etc..)

Returns Edit

genderID
String - returns Human or Elf
Note: if the specified unit doesn't exist, it returns nil.

Example Edit

Display the race of the player

DEFAULT_CHAT_FRAME:AddMessage(UnitRace("player"))

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.