private void OnAssetLoadCompleted(AAsyncOperation operation)
        {
            DatabaseAssetAsyncOperation assetOperation = (DatabaseAssetAsyncOperation)operation;
            string assetPath = operation.Path;

            if (assetNodeDic.TryGetValue(assetPath, out var assetNode))
            {
                assetNode.SetAsset(assetOperation.GetAsset());
            }
            operationLDic.Remove(assetPath);
            assetOperationPool.Release(assetOperation);
        }
Exemplo n.º 2
0
        private void OnAssetFromBundleCreated(AAsyncOperation operation)
        {
            BundleAssetAsyncOperation assetOperation = (BundleAssetAsyncOperation)operation;
            string assetPath = operation.Path;

            if (assetNodeDic.TryGetValue(assetPath, out var assetNode))
            {
                assetNode.SetAsset(assetOperation.GetAsset());
            }
            assetOperationDic.Remove(assetPath);
            operationLDic.Remove(assetPath);
            assetOperationPool.Release(assetOperation);
        }
Exemplo n.º 3
0
        private void OnBundleCreated(AAsyncOperation operation)
        {
            BundleAsyncOperation bundleOperation = (BundleAsyncOperation)operation;
            string bundlePath = bundleOperation.Path;

            if (bundleNodeDic.TryGetValue(bundlePath, out var node))
            {
                node.Bundle = (AssetBundle)bundleOperation.GetAsset();
            }
            bundleOperationDic.Remove(bundlePath);
            bundleOperationPool.Release(bundleOperation);

            operationLDic.Remove(bundlePath);
        }