Hello,
I noticed how when I set AudioClip.time to the audio clip’s length while the clip is playing, I get an error that says that the time is not within the clip’s range, so, it seems like I have to set it to anything that is less than (<) the clip’s length and not less than or equal to (<=). Therefore, when I want to create a ‘looping’ effect (based on a variable), I have to write…
if (varName < clip.length * 0.9f) {
…
}
or 90% of the clip’s length (to assure that WHILE the clip is playing, it doesn’t ‘cross over’ the clip’s length’s range). If I multiply it by 0.99f or 0.999f, there is a greater ‘risk’ of that happening. What if Unity could develop a built-in way of having AudioClip.time ‘modulate’ where the sound should be playing (upon the developer’s request), and even base it on negative numbers?.. so if AudioClip.time is set to -1, it would play from the clip’s length - 1?.. and no ‘out of range’ errors could ever come out of it? Could this be a ‘framing’ problem?