Camera Plugin for Unity

After inserting a static map with the Google API, in the next panel we must be able to use the camera of our mobile device to take a photo.

This photo will serve, in this specific case, to complete the data collection of my incident report.

Let’s get to the facts, first of all, we need to use a plugin. It is easily available in the asset store. It is Native Camera.

Native Camera, if you plan to develop exclusively for Android will do most of the work, but if you work with Apple devices, the developer has left a handy README where you can get all the necessary information.

In this file, you will also find a link to his repo of this project with some examples and the main method of capturing an image.

Without too much delay let’s take the code we need, delete the superfluous and add it to the reference script of this panel.

Now we need to create a public function to call the body of the method of our plugin and make our image a button. So that it can also take advantage of the OnClick event system.

this was my 100th medium article

project manager by day, unity developer by night