< Summary

Class:ECSTransformParentingSystem
Assembly:DCL.ECSComponents.Transform.System
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Transform/System/ECSTransformParentingSystem.cs
Covered lines:10
Uncovered lines:0
Coverable lines:10
Total lines:28
Line coverage:100% (10 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Update()0%660100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/DCLPlugins/ECS7/ECSComponents/Transform/System/ECSTransformParentingSystem.cs

#LineLine coverage
 1using DCL.Models;
 2
 3public static class ECSTransformParentingSystem
 4{
 5    public static void Update()
 6    {
 197        if (ECSTransformUtils.orphanEntities == null || ECSTransformUtils.orphanEntities.Count == 0)
 8        {
 139            return;
 10        }
 11
 612        int count = ECSTransformUtils.orphanEntities.Count;
 13
 2414        for (int i = count - 1; i >= 0; i--)
 15        {
 616            var data = ECSTransformUtils.orphanEntities.Pairs[i].value;
 17
 618            if (ECSTransformUtils.TrySetParent(data.scene, data.entity, data.parentId, out IDCLEntity parent))
 19            {
 520                if (data.entity.parentId != SpecialEntityId.SCENE_ROOT_ENTITY)
 21                {
 322                    parent.childrenId.Add(data.entity.entityId);
 23                }
 524                ECSTransformUtils.orphanEntities.RemoveAt(i);
 25            }
 26        }
 627    }
 28}

Methods/Properties

Update()