public static void LoadAsync(string abName, string assetName, Action <TextAsset> callback) { if (string.IsNullOrEmpty(abName) || string.IsNullOrEmpty(assetName)) { Debug.LogError("abName or assetName is null!!!"); if (callback != null) { callback(null); } return; } Action <AssetLoadData> tCallBack = null; if (callback != null) { tCallBack = (data) => { callback(data.mAsset as TextAsset); }; } HText res = Get <HText>(abName, assetName, AssetType.eText); res.StartLoad(false, false, false, tCallBack); }
public static TextAsset Load(string abName, string assetName) { if (string.IsNullOrEmpty(abName) || string.IsNullOrEmpty(assetName)) { Debug.LogError("abName or assetName is null!!!"); return(null); } HText res = Get <HText>(abName, assetName, AssetType.eText); res.StartLoad(true, false, false, null); return(res.AssetData.mAsset as TextAsset); }