Scrolling UVs can be a quick and easy way to add some animation to your Lens!
UPDATE: In the Snapchat app, UV scrolling will only work with power of 2 sized textures. Make sure both the width and height of your texture are any of the following: (2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048)
First, select the material you want to add UV scrolling to. For this example, I’m using the “hole_pbr” material found in the Window template.
At the bottom of the material inspector, expand "UV Transforms" and make sure "UV 2" is enabled. Then, expand "UV 2" and set "Animation" to enabled.
At the top of the material inspector, expand "Base Texture" and "Texture". Change both “Wrap Mode U” and “Wrap Mode V” to Repeat, and set “Base Tex UV” to “Transformed UV 2”.
Your material will now have scrolling UVs!
You can tweak the scrolling speeds by changing the “Offset” values found under “UV 2.” The first value controls horizontal scrolling speed, and the second value controls vertical scrolling speed. You can use negative numbers for backwards scrolling or zero for no scrolling.
Here’s an example of vertical scrolling using the offset values 0, -1:
And here’s a diagonally scrolling background using offset values -1, 1:
Have fun scrolling!