Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Finds a unit token that maps to the supplied unit GUID.
unitToken = UnitTokenFromGUID(unitGUID)
Arguments[]
- unitGUID
- string : GUID - A unit GUID to query.
Returns[]
- unitToken
- string? : UnitId - A unit token that matches the supplied unit GUID if one can be found, or nil if not.
Details[]
- The return from this function is inherently unstable and may change during processing of UI events or across frames. If storing the result of this function in a table or upvalue, you should confirm before using the stored unit token that it still maps to the unit GUID that was initially requested.
- Internally this function will iterate over a list of unit tokens to find a matching candidate. Unit tokens will be tested in the order given below, returning the first one that matches.
- player
- vehicle
- pet
- party<x>
- partypet<x>
- raid<x>
- raidpet<x>
- nameplate<x>
- arena<x>
- arenapet<x>
- boss<x>
- target
- focus
- npc
- mouseover
- softenemy
- softfriend
- softinteract
Patch changes[]
- Patch 10.0.2 (2022-11-15): Added.