Can a Lens screenshot itself, and use it as a texture
Can a Lens screenshot itself, and use it as a texture? (If so, how?)
Or, what is the Snap Lens Studio equivalent of Unity's CaptureScreenshotAsTexture?
https://docs.unity3d.com/ScriptReference/ScreenCapture.CaptureScreenshot.html
Answers
-
Yes you can
-1 -
@عماد مراد | خبير عدسة وفلاتر said:
Yes you canHow?
0 -
There is a method for taking a snapshot... but I can't find the API method for it now. Anyway, I had problems with crashing when I tried using that method.
There is another way to do it with shaders and render targets, which seems to be more performant.
https://sugar.popul-ar.com/product/snap-lib-freeze-frame2 -
@Joshua Beckwith said:
There is a method for taking a snapshot... but I can't find the API method for it now. Anyway, I had problems with crashing when I tried using that method.There is another way to do it with shaders and render targets, which seems to be more performant.
https://sugar.popul-ar.com/product/snap-lib-freeze-frameinteresting! i did not know there was a third party version of a Unity asset store for this stuff
0 -
Here is how to make a screenshot shown in the explanation via the link below from the 18th minute to the end of the video
https://www.youtube.com/watch?v=82L9zDH2lxU&t=1s0 -
@عماد مراد | خبير عدسة وفلاتر said:
Here is how to make a screenshot shown in the explanation via the link below from the 18th minute to the end of the video
https://www.youtube.com/watch?v=82L9zDH2lxU&t=1sAre you sure it is the right video? Also, do you happen to have your explanation in English - the subtitles are not available for transcription in the Farsi (?) video you sent. (Sorry, I do not understand middle eastern languages)
0 -
@yc said:
Finally figured it out. Sorta wish someone will have a Unity -> Lens Studio migration guide. Really just needed this one line -
var textureCopy = script.deviceCameraTexture.copyFrame();
Yeah, this is the method I was thinking of. It crashed iOS every time, but worked on Android. Might be OK if you are just using it sparingly.
0 -
@Joshua Beckwith said:
@yc said:
Finally figured it out. Sorta wish someone will have a Unity -> Lens Studio migration guide. Really just needed this one line -
var textureCopy = script.deviceCameraTexture.copyFrame();
Yeah, this is the method I was thinking of. It crashed iOS every time, but worked on Android. Might be OK if you are just using it sparingly.
I got it to work in the last Lens Studio release. iOS.
0