Files
adriadri6972 d3d9c5f833 upload project
2025-07-31 15:21:08 +02:00

26 lines
702 B
C#

using UnityEngine.UI;
using UnityEngine.EventSystems;
namespace UnityEngine.XR.ARFoundation
{
/// <summary>
/// Slider used for debug options in <see cref="ARDebugMenu"/>.
/// </summary>
[HelpURL(typeof(ARDebugMenu))]
public class DebugSlider: Slider
{
/// <summary>
/// Use this callback to detect pointer down events.
/// </summary>
/// <param name="eventData">The pointer down event data.</param>
public override void OnPointerDown(PointerEventData eventData)
{
base.OnPointerDown(eventData);
if(interactable)
{
value = (value == 1) ? 0 : 1;
}
}
}
}