< Summary

Class:AvatarSystem.AvatarWithHologram
Assembly:AvatarSystem
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/AvatarSystem/AvatarWithHologram.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:45
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:3
Method coverage:0% (0 of 3)

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
AvatarWithHologram(...)0%2100%
LoadTry()0%42600%
AddVisibilityConstraint(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/AvatarSystem/AvatarWithHologram.cs

#LineLine coverage
 1using Cysharp.Threading.Tasks;
 2using System.Collections.Generic;
 3using System.Threading;
 4using GPUSkinning;
 5using UnityEngine;
 6
 7namespace AvatarSystem
 8{
 9    // [ADR 65 - https://github.com/decentraland/adr]
 10    public class AvatarWithHologram : Avatar
 11    {
 12        private const float AVATAR_REVEAL_COMPLETION_OFFSET = 10;
 13
 14        private readonly IBaseAvatar baseAvatar;
 15
 16        internal AvatarWithHologram(IBaseAvatar baseAvatar, IAvatarCurator avatarCurator, ILoader loader, IVisibility vi
 17            ILOD lod, IGPUSkinning gpuSkinning, IGPUSkinningThrottlerService gpuSkinningThrottlerService, IAvatarEmotesC
 018            : base(avatarCurator, loader, visibility, lod, gpuSkinning, gpuSkinningThrottlerService, emotesController)
 19        {
 020            this.baseAvatar = baseAvatar;
 021        }
 22
 23        protected override async UniTask LoadTry(List<string> wearablesIds, List<string> emotesIds, AvatarSettings setti
 24        {
 025            baseAvatar.FadeGhost(linkedCt).Forget(); //Avoid making the ghost fading a blocking part of the avatar
 026            emotesController.Prepare(settings.bodyshapeId, baseAvatar.ArmatureContainer);
 027            List<WearableItem> emotes = await LoadWearables(wearablesIds, emotesIds, settings, baseAvatar.SkinnedMeshRen
 028            Prepare(settings, emotes);
 029            Bind();
 30
 031            MeshRenderer newCombinedRenderer = loader.combinedRenderer.GetComponent<MeshRenderer>();
 032            Inform(newCombinedRenderer);
 033            if (visibility.IsMainRenderVisible())
 034                await baseAvatar.Reveal(GetMainRenderer(), extents.y, extents.y + AVATAR_REVEAL_COMPLETION_OFFSET, linke
 35            else
 036                baseAvatar.RevealInstantly(GetMainRenderer(), extents.y + AVATAR_REVEAL_COMPLETION_OFFSET);
 037        }
 38
 39        public override void AddVisibilityConstraint(string key)
 40        {
 041            base.AddVisibilityConstraint(key);
 042            baseAvatar.RevealInstantly(GetMainRenderer(), extents.y + AVATAR_REVEAL_COMPLETION_OFFSET);
 043        }
 44    }
 45}