public AssetInfoStruct CreateAssetInfo(string S, bool bL, bool bW) { AssetInfoStruct HA = new AssetInfoStruct(); HA.Path = S; HA.bLocal = bL; HA.bWorld = bW; return(HA); }
public bool AddHistoryAsset(AssetInfoStruct AI) { for (int i = 0; i < HistoryAssets.Count; i++) { if (HistoryAssets[i].Path == AI.Path) { return(false); } } HistoryAssets.Add(AI); return(true); }
public bool RemoveFromHistory(AssetInfoStruct AI) { for (int i = 0; i < HistoryAssets.Count; i++) { if (HistoryAssets[i].Path == AI.Path) { HistoryAssets.RemoveAt(i); return(true); } } return(false); }
public AssetBundle LoadAsset(AssetInfoStruct AI) { AssetBundle MyAssetBundle; if (AI.Path == "") { return(null); } MyAssetBundle = FindAsset(AI.Path); if (MyAssetBundle != null) { return(MyAssetBundle); } if (AI.bLocal) { MyAssetBundle = AssetBundle.LoadFromFile(AI.Path); } else { WWW www = new WWW(AI.Path); while (!www.isDone) { Sleep(0.5); } MyAssetBundle = www.assetBundle; } if (MyAssetBundle != null) { AddLoadedAsset(CreateLoadedAsset(MyAssetBundle, AI.Path, AI.bLocal, AI.bWorld)); } return(MyAssetBundle); }
public void LoadFromHistory(AssetInfoStruct AI) { LoadAsset(AI); }