using System; using System.Collections.Generic; using YooAsset; namespace ET.Client { [Invoke] public class GetAllConfigBytes: AInvokeHandler> { public override Dictionary Handle(ConfigComponent.GetAllConfigBytes args) { Dictionary output = new Dictionary(); HashSet configTypes = EventSystem.Instance.GetTypes(typeof (ConfigAttribute)); foreach (Type configType in configTypes) { var op = YooAssets.GetRawFileAsync(configType.Name); output[configType] = op.GetRawBytes(); Log.Debug($"load config {configType} ok."); } return output; } } [Invoke] public class GetOneConfigBytes: AInvokeHandler { public override byte[] Handle(ConfigComponent.GetOneConfigBytes args) { //TextAsset v = ResourcesComponent.Instance.GetAsset("config.unity3d", configName) as TextAsset; //return v.bytes; throw new NotImplementedException("client cant use LoadOneConfig"); } } }