SNAPCHAT AR: LENS STUDIO KEYBOARD
As there is no built-in keyboard feature in Lens Studio yet, I decided to make one myself. One day there will be a real, proper keyboard in there, but I think this is a nice solution for now.
For easy installation instructions and a quick explanation of how to use it, check the readme-file!
No programming is required to use the Keyboard, but it is possible to call certain functions (the full list is in the readme-file).
This script does not work for Lens Studio 2.0 or newer! When I find some time, I will look into that.
In the meantime, let’s just hope Lens Studio gets its own keyboard 🙂
The keyboard supports single-line and multi-line text, with as many lines as you’d like.
There are two more panels for symbols and numbers:
And you’ve got some customization options:
More advanced usage
To quickly change the colours/materials of the keys, simply edit the Materials in the Resources folder.
To set a default text, type it into the ‘Default Text’ textbox in the Keyboard settings.
To make a multi-line default text, add ‘\n’ (without quotation marks) where you want a line split.
For example: “First line.\nSecond line.” would become:
To change the look of all keys simultaneously, delete all but one key in the ‘Keyboard/Keyboard/KeyboardObject/Keys’ object in the scene.
Simply change the look of the one remaining key to your liking, and duplicate it 30 times again.
The Keyboard script will automatically place the duplicated keys correctly and add their labels and all that.
Function – Get the keyboard output. Use an int value as optional argument to ask for a specific line! (E.g. ‘global.KeyboardResult(3)’ for line 3.)
Function – Show/hide the keyboard toggle.
Function – Plays the sound (if added in the UI) on key press.
Bool – Check if keyboard is currently visible.
Bool – Check if the Keyboard will be hidden when recording.
Int – Get the amount of lines allowed to scroll through.