Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API UnitRace

Last wiki revision 2022-08-01

Returns the race of the unit. raceName, raceFile, raceID = UnitRace(unit)

  • unit: : UnitId
  • raceName: - Localized race name, suitable for use in user interfaces.
  • raceFile: - Localization-independent race name, suitable for use as table keys.
  • raceID: - RaceId. Localization-independent raceID.

The following command prints your character's name and race to chat: /run print(UnitName("player").." is a "..UnitRace("player"))

Source

https://warcraft.wiki.gg/wiki/API_UnitRace · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.