< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetLeftHand(...)0%2100%
GetRightHand(...)0%2100%
GetLeftToe(...)0%2100%
GetRightToe(...)0%2100%
GetBodyPart(...)0%12300%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Components/Avatar/AvatarBodyPartReferenceUtility.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5namespace DCL
 6{
 7    public static class AvatarBodyPartReferenceUtility
 8    {
 9        public static Transform GetLeftHand(Transform[] bodyParts)
 10        {
 011            return GetBodyPart(bodyParts, "Avatar_LeftHand");
 12        }
 13
 14        public static Transform GetRightHand(Transform[] bodyParts)
 15        {
 016            return GetBodyPart(bodyParts, "Avatar_RightHand");
 17        }
 18
 19        public static Transform GetLeftToe(Transform[] bodyParts)
 20        {
 021            return GetBodyPart(bodyParts, "Avatar_LeftToeBase");
 22        }
 23
 24        public static Transform GetRightToe(Transform[] bodyParts)
 25        {
 026            return GetBodyPart(bodyParts, "Avatar_RightToeBase");
 27        }
 28
 29        private static Transform GetBodyPart(Transform[] bodyParts, string name)
 30        {
 031            for (int i = 0; i < bodyParts.Length; i++) {
 032                if (bodyParts[i].name == name)
 033                    return bodyParts[i];
 34            }
 035            return null;
 36        }
 37    }
 38}