1234567891011121314151617181920212223242526 |
- using System.Collections.Generic;
- using UnityEngine;
- namespace ET
- {
- public class ConfigLoader: IConfigLoader
- {
- public void GetAllConfigBytes(Dictionary<string, byte[]> output)
- {
- Dictionary<string, UnityEngine.Object> keys = ResourcesComponent.Instance.GetBundleAll("config.unity3d");
- foreach (var kv in keys)
- {
- TextAsset v = kv.Value as TextAsset;
- string key = kv.Key;
- output[key] = v.bytes;
- }
- }
- public byte[] GetOneConfigBytes(string configName)
- {
- TextAsset v = ResourcesComponent.Instance.GetAsset("config.unity3d", configName) as TextAsset;
- return v.bytes;
- }
- }
- }
|