Returns the gender of the given unit or player


See also Unit functions.

Signature:

gender = UnitSex("unit") or UnitSex("name")

Arguments:

  • unit - A unit to query (string, unitID)
  • name - The name of a unit to query; only valid for player, pet, and party/raid members (string)

Returns:

  • gender - The unit's gender (number)
    • 1 - Neuter / Unknown
    • 2 - Male
    • 3 - Female