Slider滑动条操作
代码
using UnityEngine; using UnityEngine.UI; public class Juse : MonoBehaviour { public Animator animator; public Slider slider; void Start() { slider.onValueChanged.AddListener(PatientControl); } public void PatientControl(float value) { animator.Play("Up", 0, value); animator.speed = 1; } }
标签:UnityEngine,void,Slider,滑动,操作,public,animator From: https://www.cnblogs.com/gatran/p/17490797.html