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

22 lines
1.3 KiB
Lua

-- Query only six paths from the captured table, one per heartbeat. No loading.
do local function capture()
local s=_G.__gacGachaAssetExists1 or {index=1};_G.__gacGachaAssetExists1=s
local paths={
'UI/Drawcard/GachaPanel/StandardGacha_1001.prefab',
'UI/Drawcard/GachaPanel/NoviceGacha_4001.prefab',
'UI/Drawcard/GachaPanelLimited/AvatarGacha_1102.prefab',
'UI/Drawcard/GachaPanelLimited/LightConeGacha_23001.prefab',
'UI/Drawcard/GachaPanelLimited/AvatarGacha_1204.prefab',
'UI/Drawcard/GachaPanelLimited/LightConeGacha_23010.prefab'
}
if s.index>#paths then return end
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local manager=CS.RPG.Client.GlobalVars.s_GamePhaseManager
local phase=manager and typeof(CS.RPG.Client.GamePhaseManager):GetField('_CurrentPhase',flags):GetValue(manager)
if not phase or typeof(CS.RPG.Client.BattleGamePhase):IsInstanceOfType(phase)then return end
local path=paths[s.index];s.index=s.index+1
local result=CS.RPG.Client.GlobalVars.s_AssetMgr:Exists(path)
CS.UnityEngine.Debug.Log('[GAC_GACHA_ASSET_EXISTS] '..path..' '..tostring(result))
if s.index>#paths then CS.UnityEngine.Debug.Log('[GAC_GACHA_ASSET_EXISTS] END')end
end;local ok,e=pcall(capture);if not ok then _G.__gacGachaAssetExists1={index=99};CS.UnityEngine.Debug.Log('[GAC_GACHA_ASSET_EXISTS] ERROR '..tostring(e))end end