Files
acRealman_xr/unity/PICO-Unity-Integration-SDK-release_3.4.0/Runtime/BuildingBlocks/SliderText.cs
2026-05-30 16:04:37 +08:00

32 lines
604 B
C#
Executable File

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class SliderText : MonoBehaviour
{
public Text text;
private Slider m_Slider;//Slider¶ÔÏó
// Start is called before the first frame update
void Start()
{
m_Slider = GetComponent<Slider>();
m_Slider.onValueChanged.AddListener(delegate {ValueChangeCheck(); });
}
private void ValueChangeCheck()
{
text.text = m_Slider.value.ToString();
}
// Update is called once per frame
void Update()
{
}
}