So im finding the hardest part about coding is knowing how to ask the right questions. I spent all day trying to figure this “simple” slider out haha. Ive finally decided to come back here and ask the pros. So here goes.
I have a slider, i have music that plays, i want the max length of the slider value to be the max length of the song so i can use the slider to work my way through a song. from all i can find out, it is supposed to just be AudioClip.Length, but visual studio can’t seem to find .Length(or .length) on either AudioClip, or audioClip.
Here is the code i have so far
public class musicTime : MonoBehaviour {
public AudioSource audioClip;
public Slider audioSlider;
void Start()
{
audioSlider.minValue = 0f;
audioSlider.maxValue = audioClip.length;
}
void Update()
{
}
public void timeScale()
{
}