public static AsyncOperationHandle <Texture> LoadTextureAsync(AssetReferenceTexture pAsset, Action <float> pProgress = null, Action <Texture> pOnCompleted = null) { var operation = pAsset.LoadAssetAsync(); WaitLoadTask(operation, pProgress, pOnCompleted); return(operation); }
public static void Add(AssetReferenceTexture assetRef) { if (assetRef.RuntimeKeyIsValid()) { if (assetRef.Asset == null && !AssetRefs.Contains(assetRef)) { AssetRefs.Enqueue(assetRef); if (AssetRefs.Count == 1) { LoadNext(); } } else { DispatchCompletedAllIfEmpty(); } } else { DispatchCompletedAllIfEmpty(); } }