< Summary

Class:DebugSection
Assembly:FPSDisplay
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/Debugging/FPSDisplay/DebugSection.cs
Covered lines:0
Uncovered lines:10
Coverable lines:10
Total lines:29
Line coverage:0% (0 of 10)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Start()0%2100%
CloseSection()0%2100%
OnDestroy()0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/WorldRuntime/Debugging/FPSDisplay/DebugSection.cs

#LineLine coverage
 1using UnityEngine;
 2using UnityEngine.UI;
 3
 4public class DebugSection : MonoBehaviour
 5{
 6    [SerializeField] private Button closeSectionButton;
 7    [SerializeField] private GameObject sectionContent;
 8
 9    private RectTransform rootTransform;
 10    private RectTransform closeSectionButtonTransform;
 11    void Start()
 12    {
 013        rootTransform = transform.parent.GetComponent<RectTransform>();
 014        closeSectionButton.onClick.AddListener(CloseSection);
 015        closeSectionButtonTransform = closeSectionButton.GetComponent<RectTransform>();
 016    }
 17    private void CloseSection()
 18    {
 019        sectionContent.SetActive(!sectionContent.activeSelf);
 020        closeSectionButtonTransform.Rotate(Vector3.forward,180);
 021        LayoutRebuilder.ForceRebuildLayoutImmediate(rootTransform);
 022    }
 23
 24    private void OnDestroy()
 25    {
 026        closeSectionButton.onClick.RemoveAllListeners();
 027    }
 28
 29}

Methods/Properties

Start()
CloseSection()
OnDestroy()