private static void OnLoadIconTextureError(ResourceManager.LoadRequest request, ResourceManager.ERROR_CODE error_node) { if (MonoBehaviourSingleton <GlobalSettingsManager> .IsValid()) { (request.userData as Action <Texture>)(MonoBehaviourSingleton <GlobalSettingsManager> .I.linkResources.errorIcon); } else { (request.userData as Action <Texture>)(null); } }
private bool IsStock(ResourceManager.LoadRequest request) { if (request.category == RESOURCE_CATEGORY.EFFECT_UI) { return(true); } if (request.category == RESOURCE_CATEGORY.EFFECT_ACTION && request.resourceNames != null && !request.resourceNames[0].Contains("_bg_")) { return(true); } return(false); }
protected virtual void OnLoadComplate(ResourceManager.LoadRequest request, ResourceObject[] objs) { if (objs != null && objs.Length >= 1 && objs[0] != null) { loadedObject = objs[0].obj; } loadedObjects = objs; isLoading = false; resLoad.SetReference(loadedObjects); if (IsStock(request)) { InstantiateManager.RequestStock(request.category, loadedObject, request.resourceNames[0], true); } }
protected override void OnLoadComplate(ResourceManager.LoadRequest request, ResourceObject[] objs) { if (!MonoBehaviourSingleton <InstantiateManager> .IsValid()) { base.OnLoadComplate(request, objs); } else if (objs != null && objs.Length == 1 && objs[0] != null) { loadedObject = objs[0].obj; loadedObjects = objs; resLoad.SetReference(loadedObjects); InstantiateManager.Request(resLoad, objs[0].obj, OnInstantiate, true); } else { base.isLoading = false; Log.Warning("LoadAndInstantiateObject : not support."); } }
public float GetProgress() { if (IsCompleted()) { return(1f); } List <ResourceManager.LoadRequest> loadRequests = MonoBehaviourSingleton <ResourceManager> .I.loadRequests; int i = 0; for (int count = loadRequests.Count; i < count; i++) { ResourceManager.LoadRequest loadRequest = loadRequests[i]; if (loadRequest.IsValid() && loadRequests[i].progressObject != null) { hasProgress = true; return(loadRequests[i].GetProgress()); } } hasProgress = false; return(1f); }
private static void OnLoadIconTextureComplate(ResourceManager.LoadRequest request, ResourceObject[] objs) { objs[0].refCount++; (request.userData as Action <Texture>)(objs[0].obj as Texture); }
private void OnLoadError(ResourceManager.LoadRequest request, ResourceManager.ERROR_CODE error_node) { isLoading = false; }
private void OnLoadError(ResourceManager.LoadRequest request, ResourceManager.ERROR_CODE code) { Debug.Log((object)"OnLoadError"); loadError = true; }
private void OnLoadComplate(ResourceManager.LoadRequest request, ResourceObject[] objs) { Debug.Log((object)"OnLoadComplate"); loadObject = objs[0].obj; }