public IAssetRequest CreateAssetRequest(string path, AssetRequestFinishedEventHandler callback, AssetPRI assetPRI, EnumAssetType assetType) { if (string.IsNullOrEmpty(path)) { AssetLogger.Error("string.IsNullOrEmpty(path) == true"); return(null); } string arg = Path.GetDirectoryName(path).ToLower(); string text = LocalResourceManager.ChangePathToFilenameWithoutExtension(path); path = string.Format("data/{0}/{1}.ab", arg, text); ResourceData resourceData = CollectDepResourceDataMap.RefResource(text, path, 0, assetType); return(this.CreateAssetRequest(resourceData, null, callback, assetPRI)); }
public IAssetRequest LoadScene(string path, AssetRequestFinishedEventHandler callBackFun, AssetPRI assetPRIType) { IAssetRequest result; if (string.IsNullOrEmpty(path)) { AssetLogger.Error("string.IsNullOrEmpty(path) == true"); result = null; } else { string directoryName = Path.GetDirectoryName(path); string text = LocalResourceManager.ChangePathToFilenameWithoutExtension(path); path = string.Format("data/{0}/{1}.unity3d", directoryName, text); ResourceData resourceData = CollectDepResourceDataMap.RefResource(text, path, 0, EnumAssetType.eAssetType_Scene); result = this.CreateAssetRequest(resourceData, null, callBackFun, assetPRIType); } return(result); }