Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia

Sets a texture to a unit's 2D portrait.

SetPortraitTexture(textureObject, unitToken [, disableMasking])

Arguments[]

textureObject
Texture🔗
unitToken
string : UnitToken
disableMasking
boolean? = false

Example[]

local f = CreateFrame("Frame")
f:SetPoint("CENTER")
f:SetSize(64, 64)

f.tex = f:CreateTexture()
f.tex:SetAllPoints(f)
SetPortraitTexture(f.tex, "player")

API SetPortraitTexture

Patch changes[]

Dragonflight Patch 10.0.0 (2022-10-25): Added disableMasking argument.