void Start() { string filepath = "rofbuff_bytes"; UnityEngine.TextAsset assetObj = (UnityEngine.TextAsset)_AssetManager.GetAsset <UnityEngine.Object>(AppConst.mDaoBiao_Path + filepath); if (assetObj != null) { RofBuffTable = new RofTable <RofBuffRow>(assetObj.bytes); } //StartCoroutine(StartLoadDaoBiao(filepath)); }
IEnumerator StartLoadDaoBiao(string filepath) { AssetBundle mDaoBiaoBundle = AssetBundle.LoadFromFile(AppConst.LoadRes_Root_Path + AppConst.mDaoBiao_Path + filepath); string obj_name_suff = filepath.Remove(0, filepath.LastIndexOf('_') + 1); string obj_name = filepath.Remove(filepath.LastIndexOf('_'), filepath.Length - filepath.LastIndexOf('_')) + "." + obj_name_suff; Debug.Log("===>" + obj_name); UnityEngine.TextAsset assetObj = (UnityEngine.TextAsset)mDaoBiaoBundle.LoadAsset(obj_name); RofBuffTable = new RofTable <RofBuffRow>(assetObj.bytes); Debug.Log("===>" + RofBuffTable.GetDataByID(10001).Num); yield return(null); }