How can you make a lens show the day of the week?
-
Hi Carly, this is definitely possible. You can for example show a certain object or sprite on specific days of the week. Here's an example script bound to the Initialized event that prints the current day of the week.
Comment actions -
So how could I get this to print a sprite that says the corresponding day of the week on the user's screen?
Comment actions -
Carly,
first you'd have to create 7 different images for the days of the week.
Then check which day it is using Travis' code above and show the corresponding image.
Cheers,
LukaComment actions -
The only thing is that that script prints to the logger and I’m not sure how to get it to change on screen like the clock that someone made on here
Comment actions -
Hi Carly,
I've updated the script Travis provided earlier so that it can take as input 1 Sprite Visual component and 7 Textures (one for each day of the week). It then changes the texture of the Sprite's material based on the day of the week.
Here's the script: https://pastebin.com/8fjuirrT
Let us know if you have any questions about how to set it up in Lens Studio.
Best,
Peter
Comment actions
Please sign in to leave a comment.
Have a comment?