< Summary

Class:ButtonVR
Assembly:Assembly-CSharp
File(s):D:/--UnityProject/VR/_____ISSTA 26/Edutainment-Escape-Room/Assets/Scripts/Test2/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/_____ISSTA 26/Edutainment-Escape-Room/Assets/Scripts/Test2/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)
 3914    {
 3915        if(other.CompareTag("hand"))
 016        onPress.Invoke();
 3917    }
 18
 19    private void OnTriggerExit(Collider other)
 2620    {
 2621        onRelease.Invoke();
 2622    }
 23}