< Summary

Class:ButtonVR
Assembly:Test
File(s):D:/--UnityProject/VR/VRExplorer_subjects/Edutainment-Escape-Room/Assets/Scripts/Test/LoopTask/ButtonVR.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:23
Line coverage:100% (7 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%000100%
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)
 2714    {
 2715        if(other.CompareTag("hand"))
 516        onPress.Invoke();
 2717    }
 18
 19    private void OnTriggerExit(Collider other)
 1220    {
 1221        onRelease.Invoke();
 1222    }
 23}