![snapchat.com lens studio snapchat.com lens studio](https://i1.wp.com/arcritic.com/wp-content/uploads/2017/12/create-your-own-snapchat-lenses.jpg)
The trickiest part might be knowing what to search for! An array is a list of data, in this case the various objects we want to cycle through. Let's start by adding a "SceneObject Array Input" and naming it "objects." You can add nodes by right-clicking in the graph editor and then searching for the node you want to add. If I forget to disable one of the objects, it doesn't matter because the script will take care of that. Why? I like to do it in the script because then I can enable/disable objects at will while working on the lens inside Lens Studio, but then when it is running on my device it will always work. We can do this manually by enabling/disabling items in the Objects Panel, but I like to do it within the script. Starting with a clean slateįor our tap to change effect to function properly, we need to make sure all our various objects except for the first one start out disabled. Then in the Resources Panel, all we need to do is create a Script Graph and then open up the Graph Editor. These can be post effects, color corrections, 3D objects, etc. In the Objects Panel we just need to make sure we have several objects we want to cycle through. You can preview an effect using this technique by clicking here or by scanning the snapcode below. And the best part is, the script is 100% reusable for other projects. Lens Studio does not have this feature built in, but we can set it up pretty easily with visual scripting. Letting someone tap to change the background or a post effect is pretty common in lenses.