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

21 lines
1.5 KiB
Lua

-- Read only metadata for named asset services; one type per heartbeat.
do local function capture()
local s=_G.__gacGachaAssetMetadata2 or {index=1};_G.__gacGachaAssetMetadata2=s
local names={'RPG.Client.AssetMgr','RPG.Client.AssetSystem.AssetLoader','RPG.Client.AssetSystem.AsbManifestV5_Managed'}
if s.index>#names 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 name=names[s.index];s.index=s.index+1
local t=typeof(CS.RPG.Client.GridFightModule).Assembly:GetType(name) or CS.System.Type.GetType(name..', RPG.AssetSystem')
local log=function(x)CS.UnityEngine.Debug.Log('[GAC_GACHA_ASSET_META] '..tostring(x))end
log('TYPE '..name..' '..tostring(t))
if t then
local fs=t:GetFields(flags);for i=0,math.min(fs.Length-1,159)do local f=fs[i];if name~='RPG.Client.GlobalVars' or f.Name:lower():find('asset') then log('FIELD '..f.Name..' '..f.FieldType.FullName)end end
local ms=t:GetMethods(flags);for i=0,math.min(ms.Length-1,191)do local m=ms[i];if m.DeclaringType==t then log('METHOD '..tostring(m))end end
end
if s.index>#names then log('END')end
end;local ok,e=pcall(capture);if not ok then _G.__gacGachaAssetMetadata2={index=99};CS.UnityEngine.Debug.Log('[GAC_GACHA_ASSET_META] ERROR '..tostring(e))end end