yasirkula / UnityNativeCamera

A native Unity plugin to take pictures/record videos with device camera on Android & iOS
MIT License
615 stars 71 forks source link

need on off camera using script #80

Open ti-hardikshah opened 2 years ago

ti-hardikshah commented 2 years ago

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

yasirkula commented 2 years ago

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.

ti-hardikshah commented 2 years ago

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?

yasirkula commented 2 years ago

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.