< Summary

Class:ButtonVR
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/LoopTask/ButtonVR.cs
Covered lines:6
Uncovered lines:1
Coverable lines:7
Total lines:23
Line coverage:85.7% (6 of 7)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:2
Method coverage:100% (2 of 2)

Coverage History

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnTriggerEnter(...)0%00075%
OnTriggerExit(...)0%000100%

File(s)

D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/LoopTask/ButtonVR.cs

#LineLine coverage
 1using System.Collections;
 2using System.Collections.Generic;
 3using UnityEngine;
 4using UnityEngine.Events;
 5
 6public class ButtonVR : MonoBehaviour
 7{
 8    public GameObject button;
 9    public UnityEvent onPress;
 10    public UnityEvent onRelease;
 11
 12
 13    private void OnTriggerEnter(Collider other)
 1714    {
 1715        if(other.CompareTag("hand"))
 016        onPress.Invoke();
 1717    }
 18
 19    private void OnTriggerExit(Collider other)
 1320    {
 1321        onRelease.Invoke();
 1322    }
 23}