Can you get the Length of an AudioSource?
No, why would an AudioSource have a length? It’s just for emitting sound. AudioClip objects have a length attribute though. You can use AudioSource.clip.length to find the length of the current AudioClip in use by an AudioSource.
Thanks that works great, now the last thing i need is to make the audio play from a certain time position, i cant find any variables or functions for this?
Time position within the clip?
nice one thanks, is it possible to have more than one audio file attached to an audiosource?
No, however you can have up to 128 audio sources playing at the same time. I have not tested if you can have more than one audioSource component on an object, but that would kind of mess up the whole audioSource parameter in MonoBehaviour.
You can easily have multiple objects playing though.
Oops… let me clarify… Only one audio clip can be playing on one audio source at a time… you can mix the clips however you want to.
If i am reading this right from what you have said , you can have more than 1 clip attached to an audio source but only 1 clip can be played at any one time?
how can i attach more clips?
If you are reading what it says in the docs, and I am having doubts, you change the clip by assigning a new clip to the AudioSource.
lol cheers
Does that mean you got it now? I don’t like the AudioSource/AudioClip system and think it should be more like the animation system where you could attach multiple clips more easily, but this is what we have at the moment.
Yeah i got it thank you, you should be able to do like you say and add multiple clips so you can give the designers more free range instead of hard coding it in.
Thanks for your help