< Summary

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

Coverage History

Metrics

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

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)
 614    {
 615        if(other.CompareTag("hand"))
 016        onPress.Invoke();
 617    }
 18
 19    private void OnTriggerExit(Collider other)
 020    {
 021        onRelease.Invoke();
 022    }
 23}