< Summary

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

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
OnPointerEnter(...)0%6200%
OnPointerExit(...)0%6200%

File(s)

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

#LineLine coverage
 1using UnityEngine;
 2using UnityEngine.EventSystems;
 3
 4public class SizeOnHover : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
 5{
 6    public RectTransform targetRectTransform;
 7
 8    public float hoverScale;
 9
 10    public float normalScale;
 11
 12    public void OnPointerEnter(PointerEventData eventData)
 13    {
 014        if (targetRectTransform != null)
 015            targetRectTransform.localScale = Vector3.one * hoverScale;
 016    }
 17
 18    public void OnPointerExit(PointerEventData eventData)
 19    {
 020        if (targetRectTransform != null)
 021            targetRectTransform.localScale = Vector3.one * normalScale;
 022    }
 23}