yasirkula/UnityNativeCamera

need on off camera using script

ti-hardikshah opened this issue · 3 comments

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

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.

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?

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.