WoWInterface - View Single Post - Accessing fontstring from secure snippet
View Single Post
03-15-18, 03:49 PM   #3
A Fallenroot Satyr
Join Date: Mar 2018
Posts: 23
It seems that the proper way to update unit information is OnAttributeChanged handler. Something like
Lua Code:
  1. function MyFrames_UnitTemplate_OnAttributeChanged(self, attributeName)
  2.   if attributeName == "unit" then
  3.     self.name:SetText(UnitName(self:GetAttribute("unit")))
  4.   end
  5. end
seems to work for me (I didn't test it in combat yet). I guess I overcomplicated with those secure snippets, there's no use for them at all for my purposes.
  Reply With Quote