< Summary

Class:FollowBehaviour
Assembly:ProceduralSkybox
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/ProceduralSkybox/ToolProceduralSkybox/Scripts/FollowBehaviour.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:30
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
LateUpdate()0%30500%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Rendering/ProceduralSkybox/ToolProceduralSkybox/Scripts/FollowBehaviour.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4
 5public class FollowBehaviour : MonoBehaviour
 6{
 7    public GameObject target;
 8    public bool followRot;
 9    public bool followPos;
 10    public bool ignoreYAxis = false;
 11
 12    private void LateUpdate()
 13    {
 014        if (target == null)
 015            return;
 16
 017        if (followRot)
 018            this.transform.rotation = target.transform.rotation;
 19
 020        if (followPos)
 21        {
 022            Vector3 pos = target.transform.position;
 023            if (ignoreYAxis)
 24            {
 025                pos.y = 0;
 26            }
 027            this.transform.position = pos;
 28        }
 029    }
 30}

Methods/Properties

LateUpdate()