You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
748 B
26 lines
748 B
3 years ago
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace ET
|
||
|
{
|
||
|
public class ConfigLoader: IConfigLoader
|
||
|
{
|
||
|
public void GetAllConfigBytes(Dictionary<string, byte[]> output)
|
||
|
{
|
||
|
Dictionary<string, UnityEngine.Object> keys = YooAssetComponent.Instance.GetAssetsByTagSync("Config");
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|