Hey
I want my game to remember where the music left off if you quit the application. Can someone explain to me why the following doesn't seem to work and how to properly set the start time of an audio source:
var test : AudioSource;
function Start()
{
test.time = 3.00;
test.Play();
print (test.time);
}
The print gives a number close to 0 like 0.27xxx I'm using an Mp3 for the music, and I'm working with unity iphone.
Thanks! you all rock!
Cheers
Vin
Hey wow, thanks for the ultra fast reply! I don't need it to be super accurate, but if i change the value to say 40. It still starts a 0. it just doesn't change at all! thanks again!
– JaywalkerHm, strange. Have you tried swapping the order around, so you call Play() first, then set the time on the next line?
– duckThats it! starting the audio first makes it work! thanks a lot!
– Jaywalker+1 and 10k @Duck :) happy moderating..!!!
– anon4553185@duck - can i set the end time of the audio source?
– anon16040702