Is it possible to manually reset the lens?
I have an animation that is running on Lens Turned On and I'm updating the Animation Layer after the fact, but since the initial animation runs on Lens Turned On it never uses the new Layer information.
If I could manually trigger a lens reset when updating the Layer it should solve my problem. Is this possible?
No, this is not possible. FWIW, the Initialized event happens after Lens Turned On. Perhaps you could use Initialized? Additionally, events are executed in the order they appear in the objects panel. So if you want one script to happen after another script (bound to the same event), just drag that object to be lower in the objects panel. Hope that helps!
Hello,
Travis wrote :
>> the Initialized event happens after Lens Turned On.
Are you sure ?
The documentation states this :
>> Initialized : Scripts bound to this event will trigger before any other event in the Lens (including Lens Turned On and Frame Updated).
Found in the documentation : https://lensstudio.snapchat.com/guides/scripting/script-events/
Hi One More Admin,
I think Travis misspoke, Initialized event will happen before the Lens Turned On event.
You can test it with a simple script like this:
Add the script for each event you want to test out, and add a message for each one:
In the Logger, you'll see "initialized" printed out before "lens turned on".
Let me know if you have any more questions!