UI Toggle Text visibility
Hey everyone,
I am really new to Lens Studio and can't code but I made a Lens I am really happy about.
But it has some text and I want to choose inside Snapchat if the text is visible or not, I saw the UI kit and I am trying to use that (The toggle)
I have 3 text layers inside of a full frame region, is it possible to enable/disable the full frame region with a toggle switch?
Sorry if u dont understand, English isn't my first language!
Thanks so much,
Robbert
Hi,
There's a lot of ways to do this.
Here's one of them:
We need 2 things:
- Behavior script
- and a image object / Screen image that they can click on to toggle.
Click on Behavior script and set "Touch Target" to the screen image that they gonna click on to switch visible or not.
Change "Response type" to Set enabled, and then set Target to the Full Frame Region that's gonna disappear or appear.
Change Action to Toggle.
It should now look like this:
If you did it correctly, it should disappear and appear when you click the image.
Project file: https://drive.google.com/file/d/1Hq2K3lrNn0Hz4TqX8s8yKMKoKmCp1poY/view?usp=sharing
Let me know if you need help or got any questions