void OnGUI() { if (GUI.Button(new Rect(10, 10, 150, 30), "Generate exception")) { } if (GUI.Button(new Rect(10, 50, 150, 30), "Load Shuaishuai")) { ResContext.LoadAssetAsync("role/shuaishuai", "ShuaiShuai(Merged)", typeof(GameObject), OnLoadedShuaiShuai); } if (GUI.Button(new Rect(10, 90, 150, 30), "Load Joe")) { ResContext.LoadAssetAsync("role/joe", "Joe(Merged)", typeof(GameObject), OnLoadedJoe); } if (GUI.Button(new Rect(10, 130, 150, 30), "Load LittleGirl")) { ResContext.LoadAssetAsync("role/littlesister", "LittleSister(Merged)", typeof(GameObject), OnLoadedLittleSister); } if (GUI.Button(new Rect(10, 170, 150, 30), "Load Mage")) { ResContext.LoadAssetAsync("role/mage", "Mage(Merged)", typeof(GameObject), OnLoadedMage); } if (GUI.Button(new Rect(10, 210, 150, 30), "Open Login")) { ResContext.LoadAssetAsync("ui/login", "Login", typeof(GameObject), OnLoadedMage); } if (GUI.Button(new Rect(10, 250, 150, 30), " ")) { } if (GUI.Button(new Rect(10, 290, 150, 30), " ")) { } }
public LoadAssetOperation LoadAssetAsync(string assetPath, string assetbundleName, string assetName, Type assetType, LoadAssetCallback callback = null, ResourceLoadParam param = null) { if (ResContext.IsResourceMode) { return(ResContext.LoadAssetAsync(assetPath, assetName, assetType, callback, param)); } else { return(ResContext.LoadAssetAsync(assetbundleName, assetName, assetType, callback, param)); } }
public LoadAssetOperation LoadWindowWithResource(string resPath, LoadAssetCallback callback = null, ResourceLoadParam param = null) { if (string.IsNullOrEmpty(resPath)) { return(null); } if (ResContext.IsInProgress(resPath, string.Empty) != null) { return(null); } return(ResContext.LoadAssetAsync(resPath, "", typeof(GameObject), true, callback, param)); }
public LoadAssetOperation LoadWindowWithAssetBundle(string bundleName, string assetName, LoadAssetCallback callback = null, ResourceLoadParam param = null) { if (string.IsNullOrEmpty(assetName)) { return(null); } if (ResContext.IsInProgress(bundleName, assetName) != null) { return(null); } return(ResContext.LoadAssetAsync(bundleName, assetName, typeof(GameObject), true, callback, param)); }