- Home /
Question by
Bluestrike · Nov 30, 2014 at 12:50 PM ·
audiosaveload
Save game support, how do I load audio in a sertain time frame?
I am working on a save game for my game. I want to load a sound at the position where it was in its track when saved. Trying an approach simular to how I save my animation state I came up with this:
// save function is saving audio.time
// load function
var soundState = ES2.Load.<float> ( cSaveManager.savePath + "?tag=soundState" + uniqueSaveID );
Debug.Log(soundState);
audio.Play();
audio.time = soundState;
The debug log shows the time that was saved. So it looks like I can't set a audo too its time using audio.time. How can I set the auto to the desired position in the track?
Comment