< Summary

Class:DCL.UserBenchmarkToggler
Assembly:MainScripts
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/Debugging/Panels/UserBenchmarkToggler.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:34
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%2100%
Update()0%6200%
TogglePanel()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/Debugging/Panels/UserBenchmarkToggler.cs

#LineLine coverage
 1using DCL.Helpers;
 2using UnityEngine;
 3using UnityEngine.UI;
 4
 5namespace DCL
 6{
 7    public class UserBenchmarkToggler : MonoBehaviour
 8    {
 9        const string SHORTCUT_TEXT = "[Y] Debug Panel";
 10
 11        public UserBenchmarkController userBenchmarkController;
 12        Text text;
 13
 14        void Start()
 15        {
 016            text = GetComponent<Text>();
 017            text.text = SHORTCUT_TEXT;
 018        }
 19
 20        void Update()
 21        {
 022            if (Input.GetKeyUp(KeyCode.Y))
 23            {
 024                TogglePanel();
 25            }
 026        }
 27
 28        private void TogglePanel()
 29        {
 030            userBenchmarkController.gameObject.SetActive(!userBenchmarkController.gameObject.activeSelf);
 031            Utils.ForceRebuildLayoutImmediate(transform.parent.GetComponent<RectTransform>());
 032        }
 33    }
 34}

Methods/Properties

Start()
Update()
TogglePanel()