UnityNativeCamera icon indicating copy to clipboard operation
UnityNativeCamera copied to clipboard

need on off camera using script

Open ti-hardikshah opened this issue 4 years ago • 3 comments

Need way to start and stop camera using c# script. and switch camera (Front and back).

ti-hardikshah avatar Dec 16 '21 09:12 ti-hardikshah

This plugin only allows you to open the camera app. It isn't possible to close the camera app from C# side because Unity is paused while the camera is open. You'll need another plugin that renders the camera into a Texture in Unity.

yasirkula avatar Dec 16 '21 09:12 yasirkula

Thanks for the quick replay. I guess I need to render texture only. is there any way to do it using a native plugin? Can we handle Camera open-close functionality using native code?

ti-hardikshah avatar Dec 17 '21 05:12 ti-hardikshah

You can but not with NativeCamera and I don't know the details of how to accomplish this. But it has been done before so it's possible.

yasirkula avatar Dec 17 '21 07:12 yasirkula