< Summary

Class:HideAvatarsModifier
Assembly:AvatarShape
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Avatar/AvatarModifiers/modifiers/HideAvatarsModifier.cs
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:25
Line coverage:0% (0 of 8)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
ApplyModifier(...)0%6200%
RemoveModifier(...)0%6200%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Avatar/AvatarModifiers/modifiers/HideAvatarsModifier.cs

#LineLine coverage
 1using DCL;
 2using UnityEngine;
 3
 4public class HideAvatarsModifier : AvatarModifier
 5{
 6    private const string HIDE_AVATARS_MODIFIER = "HIDE_AVATARS_MODIFIER";
 7
 8    public override void ApplyModifier(GameObject avatar)
 9    {
 010        AvatarVisibility avatarVisibility = avatar.GetComponent<AvatarVisibility>();
 011        if (avatarVisibility != null)
 12        {
 013            avatarVisibility.SetVisibility(HIDE_AVATARS_MODIFIER, false);
 14        }
 015    }
 16
 17    public override void RemoveModifier(GameObject avatar)
 18    {
 019        AvatarVisibility avatarVisibility = avatar.GetComponent<AvatarVisibility>();
 020        if (avatarVisibility != null)
 21        {
 022            avatarVisibility.SetVisibility(HIDE_AVATARS_MODIFIER, true);
 23        }
 024    }
 25}