< Summary

Class:GDX.Developer.Reports.Resource.Objects.AssetBundleObjectInfo
Assembly:GDX
File(s):D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Developer/Reports/Resource/Objects/AssetBundleObjectInfo.cs
Covered lines:9
Uncovered lines:3
Coverable lines:12
Total lines:52
Line coverage:75% (9 of 12)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:3
Method coverage:66.6% (2 of 3)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Clone()0%2100%
Populate(...)0%110100%
GetDetailedInformation(...)0%110100%

File(s)

D:/BuildAgent/work/GDX-Documentation/Projects/GDX_Development/Packages/com.dotbunny.gdx/GDX/Developer/Reports/Resource/Objects/AssetBundleObjectInfo.cs

#LineLine coverage
 1// Copyright (c) 2020-2022 dotBunny Inc.
 2// dotBunny licenses this file to you under the BSL-1.0 license.
 3// See the LICENSE file in the project root for more information.
 4
 5#if !UNITY_DOTSRUNTIME
 6
 7using UnityEngine;
 8
 9namespace GDX.Developer.Reports.Resource.Objects
 10{
 11    /// <exception cref="UnsupportedRuntimeException">Not supported on DOTS Runtime.</exception>
 12    public sealed class AssetBundleObjectInfo : ObjectInfo
 13    {
 14        public new const string TypeDefinition = "GDX.Developer.Reports.Resource.Objects.AssetBundleObjectInfo,GDX";
 15
 16        public bool IsStreamedSceneAssetBundle;
 17        public int AssetCount;
 18
 19        /// <summary>
 20        /// Create a clone of this object.
 21        /// </summary>
 22        /// <returns></returns>
 23        public override ObjectInfo Clone()
 024        {
 025            return new AssetBundleObjectInfo()
 26            {
 27                CopyCount = CopyCount,
 28                MemoryUsage = MemoryUsage,
 29                Name = Name,
 30                Reference = Reference,
 31                TotalMemoryUsage = TotalMemoryUsage,
 32                Type = Type,
 33                IsStreamedSceneAssetBundle =  IsStreamedSceneAssetBundle,
 34                AssetCount = AssetCount
 35            };
 036        }
 37
 38        public override void Populate(Object targetObject, TransientReference reference = null)
 339        {
 340            base.Populate(targetObject, reference);
 341            AssetBundle assetBundle = (AssetBundle)targetObject;
 342            IsStreamedSceneAssetBundle = assetBundle.isStreamedSceneAssetBundle;
 343            AssetCount = assetBundle.GetAllAssetNames().Length;
 344        }
 45
 46        public override string GetDetailedInformation(int maximumWidth)
 447        {
 448            return $"Asset Count:{AssetCount.ToString()}";
 449        }
 50    }
 51}
 52#endif