< 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:11
Coverable lines:11
Total lines:30
Line coverage:0% (0 of 11)
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        CloseSection();
 017    }
 18    private void CloseSection()
 19    {
 020        sectionContent.SetActive(!sectionContent.activeSelf);
 021        closeSectionButtonTransform.Rotate(Vector3.forward,180);
 022        LayoutRebuilder.ForceRebuildLayoutImmediate(rootTransform);
 023    }
 24
 25    private void OnDestroy()
 26    {
 027        closeSectionButton.onClick.RemoveAllListeners();
 028    }
 29
 30}

Methods/Properties

Start()
CloseSection()
OnDestroy()