Hi, I’m currently working on a scene that uses the Timeline to scroll through it and have been trying to put multiple audio clips/sound effects into one track in the timeline to time it to my scroll animation. The audio plays in the Unity editor but when exported to the local server the audio doesn’t play. Is this possible as I’m not really sure what I’m missing for it to work? Thanks
Hello there – we have an experimental AI bot that might be able to help you with your question. Would you like to try this out?
How it works:
Reply to the messages of the bot that end with a thread_id to interact with it and ask follow-up questions. You can also mention the bot directly in this channel to get help.
Hello Jamiee, it is possible to handle multiple audio clips through the AudioTrackHandler component in the Needle Engine. This component can be used to preload the timeline audio, which suggests there might be additional steps you need to take when exporting to ensure that the audio plays correctly on your local server.
Make sure the audio files are correctly referenced and available on your local server. It can be helpful to preload the audio for your timeline using the loadAudio method to ensure smooth playback during your scroll animation.
If you’re still facing issues with audio playback after confirming all the steps above, you might want to look into how the audio is being handled in the export process—there could be a discrepancy in how the Unity editor handles audio compared to the Needle Engine runtime on a server.
Here’s a reference to the relevant section in the documentation:
export declare class AudioTrackHandler extends TrackHandler {
// ... other properties and methods ...
/** Call to load audio buffer for a specific time in the track. Can be used to preload the timeline audio */
loadAudio(time: number, lookAhead?: number, lookBehind?: number): void;
}