Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns true if the unit exists.
exists = UnitExists(unit)
Arguments[]
- unit
- string : UnitId
Returns[]
- exists
- boolean - true if the unit exists and is in the current zone, or false if not
Example[]
The snippet below prints a message describing what the player is targeting.
if UnitExists("target") then print("You're targeting a " .. UnitName("target")) else print("You have no target") end