In the last week, I was working on a project with UI requirements. It took me a few hours to figure out how to hide the UI in the post-recording. So, I thought it would be helpful to create a post for other lens creators.
I have created an example project. You can download it from GitHub: LINK
You can learn in detail about how camera rendering works in Lens Studio with official documentation: LINK
Here are the instructions to hide the on-screen buttons/interface:
By default, the Lens Studio project will have a camera texture called Render Target. We need two camera texture to perform this.
Resources Panel >> Texture >> Render Target
To avoid confusion, we will rename the new Render Target to Live Target.
Now, select the Live Target(new render target), and go to the Inspector Panel.
Inspector Panel >> Input >> Render Target (default render target) >> Ok
Then go to the Object Panel and select the Orthographic Camera(a camera which has the UI). Make sure to use a separate camera only for UI. If you keep your visible objects under the same Orthographic Camera, even those items will be invisible in the post-recording.
Objects Panel >> Orthographic Camera >> Inspector Panel >> Camera >> Render Target >> Live Target (new render target) >> Ok
Now, select the Scene Config Panel (on the right-side of Resources Panel). Here you will see two targets. One for the Pre & Post Recording, which is Capture Target. And another one only for Pre Recording, which is Live Target.
By default, both targets will have Render Target as the selection. To hide the UI in Post-Recording, we need to assign the Live Target(from the resources panel) to the Live Target in the Scene Config panel.
Scene Config >> Live Target >> Live Target (camera texture) >> Ok
By doing these steps, everything under the Orthographical Camera will be hidden in the Post-Recording.
Well, I tried my best to explain this process. I hope it will be helpful to someone.
Thank you! #GivingBackToCommunity
Please sign in to leave a comment.