(Bug) Playing audio on record crashing.
I'm not too sure why this doesn't work, but it crashes in app, but not in lens studio.
if(global.scene.isRecording() && !record)
{
delayedEvent.reset(2);
record=true;
}
var delayedEvent = script.createEvent("DelayedCallbackEvent");
delayedEvent.bind(function(eventData)
{
script.audio.play(1);
script.audio.position=1.3;
});
Hi Gartia,
Are you trying to play a sound 2 seconds after recording starts? If so, try this version of the script:
Make sure you hook up "audio" in the Inspector to the Audio component you want to play.
Let me know if this doesn't solve your problem, or you have any more questions!