< Summary

Class:UIButton
Assembly:AvatarEditorHUD
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/AvatarEditorHUD/Scripts/UIButton.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:21
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
Awake()0%110100%
OnDestroy()0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/HUD/AvatarEditorHUD/Scripts/UIButton.cs

#LineLine coverage
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using UnityEngine;
 5using UnityEngine.UI;
 6
 7[RequireComponent(typeof(Button))]
 8public abstract class UIButton : MonoBehaviour
 9{
 10    protected Button button;
 11
 12    protected void Awake()
 13    {
 110814        button = GetComponent<Button>();
 110815        button.onClick.AddListener(OnClick);
 110816    }
 17
 182018    private void OnDestroy() { button.onClick.RemoveListener(OnClick); }
 19
 20    protected abstract void OnClick();
 21}

Methods/Properties

Awake()
OnDestroy()