SetPortraitTexture

From Warcraft Wiki
Jump to navigation Jump to search

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.png

Patch changes

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