Marker tracking with audio - audio only plays one time
Hi, I've been playing around with marker tracking and want to make a project where the AR content is entirely audio based. I've set up a project with 3 Marker Tracking Images and each one has a short audio clip (mp3, under 15secs). When I send the project to Snapchat, each image triggers its sound effect as expected, but only one time. This is really weird to me, since looking at the same marker more than once always re-triggers visual overlay content, so I'm a bit stumped as to why the audio with image tracking will only fire once per image.
Any thoughts?
Hi, Dieselfish
That is expected, I assume your audio has autoplay loop checkbox selected.
You would want to use onMarkerFound event to trigger audio playing.
I would suggest using for example a Behavior script and setup like this :
Behavior script can be added in the Resources panel or from the Asset Library!
Hi, thank you - I figured it was an issue of scripting as I was able to get something similar to this to work on a much earlier version of Lens Studio.
I wonder if you're using an older version? It seems as though "On Awake" has replaced Initialized.
I did indeed! Should work fine with onAwake!
Olha special explanation