27 lines
602 B
C#
27 lines
602 B
C#
using Superlazy;
|
|
using UnityEngine;
|
|
|
|
public class SLUnityDataLoader : SLDataLoader
|
|
{
|
|
private readonly string mobilePath = "Data";
|
|
|
|
public override void Load()
|
|
{
|
|
var texts = SLResources.LoadAll<TextAsset>(mobilePath);
|
|
foreach (var text in texts)
|
|
{
|
|
if (text)
|
|
{
|
|
var data = text.text;
|
|
if (data.IsLeft("{"))
|
|
{
|
|
Load("json", data);
|
|
}
|
|
else
|
|
{
|
|
Load("yaml", data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |