Snap Camera Script
I am trying to use the Snap Camera script under the Snap Camera Guide, the one that detects whether the lens is being seen with either SnapChat or Snap Camera. Whenever I set my live preview to Snap Camera, the logger always says "Lens running on Snap Chat". It says that for all the live previews actually.
The project I have is a combination of Face in Picture and Face Mask. In order to get this to work I had to create a new Render Target and change both the Camera and Orthographic Camera to new Inputs and Render Targets. The script needs to point to a Device Camera Texture which only one camera is using. Looking at the screenshots below, can someone tell me if I need to change it to one of the other renders or maybe do I need to change the Capture and Live Target renders? The render targets for each camera are underneath their respective cameras. Thanks!
The input should be the device camera texture itself, not a return target.
I think it also needs to be set to run on Lens Turned On instead of Initialized. Haven't used it in a while but I remember the texture size wasn't actually updating for me when set to initialized.
Dear Richard Gray
In order for the Snap Camera helper script to work, you'll need to set the script execution time to Lens Turned On (the dropdown button next to the script name in inspector)
The helper script on the Snap Camera page is also only a debug logger script, so your lens should be working fine without it.
What is it exactly that you need to achieve that requires new render targets? Do you have a face in picture then a face mask on top of it?
If that's the case, maybe you could try having one render target but different layers. For example, you can have one layer with bigger number (lower on the layer hierarchy) for the face mask and a layer with smaller number for the face in picture? Remember in the object hierarchy things below would be rendered on top of the things above them. Try playing around with the orders for both and see if you can get what you want from it.
Let me know if this works for you!