< Summary

Class:DCL.Providers.EditorAssetBundleProvider
Assembly:AssetPromiseKeeper
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/AssetManager/AssetBundles/AB/Providers/EditorAssetBundleProvider.cs
Covered lines:3
Uncovered lines:1
Coverable lines:4
Total lines:24
Line coverage:75% (3 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetAssetBundleAsync(...)0%2.062075%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/AssetManager/AssetBundles/AB/Providers/EditorAssetBundleProvider.cs

#LineLine coverage
 1using Cysharp.Threading.Tasks;
 2using System.IO;
 3using System.Threading;
 4using UnityEngine;
 5
 6namespace DCL.Providers
 7{
 8    /// <summary>
 9    /// Local Asset Bundles support, if you have the asset bundles in that folder, we are going to load them from there.
 10    /// This is a debug feature
 11    /// </summary>
 12    public class EditorAssetBundleProvider : IAssetBundleProvider
 13    {
 14        public UniTask<AssetBundle> GetAssetBundleAsync(string contentUrl, string hash, CancellationToken cancellationTo
 15        {
 2916            string localUrl = Application.dataPath + "/../AssetBundles/" + hash;
 17
 2918            if (File.Exists(localUrl))
 019                return UniTask.FromResult(AssetBundle.LoadFromFile(localUrl));
 20
 2921            return UniTask.FromResult<AssetBundle>(null);
 22        }
 23    }
 24}