diff --git a/api/unitframes.lua b/api/unitframes.lua index 5644ff0b..7dddff8a 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -762,6 +762,15 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick) f:UpdateFrameSize() f:EnableScripts() + if f.config.visible == "1" then + pfUI.uf:RefreshUnit(f, "all") + f:EnableScripts() + f:UpdateFrameSize() + else + f:UnregisterAllEvents() + f:Hide() + end + table.insert(pfUI.uf.frames, f) return f end