Returns the overall 3D depth of the frame (for stereoscopic 3D configurations). Unlike :GetDepth() which returns the apparent depth of the frame relative to its parent, this function returns the absolute depth of the frame, taking into account the relative depths of parent frames.

Signature:

depth = Frame:GetEffectiveDepth()

Returns:

  • depth - Apparent 3D depth of this frame relative to the screen (number)

Examples:

CreateFrame("Frame","Frame1", UIParent)
Frame1:SetDepth(0.5)
CreateFrame("Frame","Frame2", Frame1)
Frame2:SetDepth(1)
CreateFrame("Frame","Frame3", Frame2)
Frame3:SetDepth(-0.25)

UIParent:GetEffectiveDepth()
-- returns 1
Frame1:GetEffectiveDepth()
-- returns 1.5
Frame2:GetEffectiveDepth()
-- returns 2
Frame3:GetEffectiveDepth()
-- returns 1.75