Drag to switch between two face masks- Olha
I did this tutorial here:https://support.lensstudio.snapchat.com/hc/en-us/community/posts/4407641428244-Drag-to-switch-between-two-face-masks
It works pretty well for me, but I get an error when I try to publish referring to a line in her code, line 6. Not sure how to define the property "mainPass'
13:55:05 [Scenarium] TypeError: cannot read property 'mainPass' of undefined
at updateMaterial (PaleScript.js:6) preventsyield
Answers
-
The "mainPass" property is a property of a "Material" object, which defines how the object should be rendered. It's likely that the "updateMaterial" function in the script is trying to access this property in order to update the material of the object.
A possible solution to this issue would be to make sure that a Material object is assigned to the object(s) that you're trying to update before running the script.
Check that the materials you're using have the mainPass property, in case they are custom-made or imported, try importing it again and check if you are using the right version of the material.
0