Files
GaCy-GO/tools/ping_sprite_capture.lua
T
2026-10-28 18:54:43 +07:00

15 lines
924 B
Lua

do
if not _G.__gacPingSpriteCapture1 then
_G.__gacPingSpriteCapture1=true
local p='UIRoot/Page/MazeMainPage(Clone)/RightTopArea/NetStatusPanel/NetStatusPanel(Clone)/Connected/'
for _,n in ipairs({'Level1','Level2','Level3'})do
local ok,err=pcall(function()
local root=CS.UnityEngine.GameObject.Find(p:gsub('/Connected/$',''))
local t=root and root.transform:Find('Connected/'..n);local g=t and t:GetComponent(typeof(CS.UnityEngine.UI.Image))
if g and g.sprite then local s=g.sprite;CS.UnityEngine.Debug.Log('[GAC_PING_SPRITE] '..n..' rect='..tostring(s.rect)..' texRect='..tostring(s.textureRect)..' offset='..tostring(s.textureRectOffset)..' rotation='..tostring(s.packingRotation)..' texture='..tostring(s.texture.width)..','..tostring(s.texture.height)..' color='..tostring(g.color))end
end)
if not ok then CS.UnityEngine.Debug.Log('[GAC_PING_SPRITE] ERROR '..tostring(err))end
end
end
end