コード例 #1
0
        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);
        }
コード例 #2
0
        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();
            }
        }