- Home /
How to capture and save camera image on Android?
Hi, I know that this question have been asked before, but I couldn't find any clear answer.
What I'm trying to achieve is that you can take a photo from your device's camera and then save it, so that the user could watch it in another scene.
How can this be done?
Thanks, Andreas :-)
Answer by kromenak · Jul 20, 2013 at 04:25 AM
Unity has some WebCam classes that might be helpful, but it isn't clear from their documentation whether it works on Android. Might be worth a shot, though: http://docs.unity3d.com/Documentation/ScriptReference/WebCamTexture.html
Failing that, the guys at Prime31 offer a couple plugins for getting photos from a device's camera. The android "Etcetera" plugin has the camera support: http://prime31.com/plugins. You need to pay for it, but it should get the job done.
Failing that, I think you'd have to write your own Android plugin to get data from the camera. This is not terribly difficult, but has a steep learning curve. You can check out these documents as a starting point: http://developer.android.com/reference/android/hardware/Camera.html http://docs.unity3d.com/Documentation/Manual/PluginsForAndroid.html
Forum : Unity Forum Assets Store : Capture and Save on Assets store
This plugin is for you.
CameraShot : http://u3d.as/content/devesh-pandey/camera-shot/8t8
Your answer
