- Home /
Question by
lilhuns · Oct 19, 2017 at 03:40 PM ·
background music
My question is how do I get it to save my background music point and load it into the next scene?
Okay Im making my first game and i'm using Scriptable objects instead of singletons and Dontdestroyonload. I have already got most of my data to carry over like health, xp, ammo, etc. How do I save the music data to load in without there being a weird load pause and starting the song over?
Comment
Answer by Kishotta · Oct 19, 2017 at 03:57 PM
Before unloading the first scene, cache your AudioSource's timeSamples
property. You can then set the property again in the second scene and the audio should pick up where it left off. I'm not sure this will do much for the gap in between though.