Camera Plugin made easy with Unity!

Edward Kim
2 min readJun 5, 2021

In terms of my current App that I am making, I need to have it use the phone camera to take photos of accidents to upload to cases.

Instead of making everything from scratch I have opted to use a plugin that handles the phone camera. Namely a plugin called Native Camera.

As you can see I have installed NativeCamera as a plugin, and have my Photo panel ready in the application. What is great about this is that on the creators github, there is code already made as shown on the right image that i can use to just, well take the photo.

We just have our button call this method and like magic it works! The camera gets activated and you can take your photo.

What taking the photo does is save our photo which is now a raw image, and turn it into a texture. We now set active the raw image GameObject to have it show.

We then need to make sure that we update the UIManager with our image data as well as our text from the panel. After that we have successfully finished our panel in lightning speed thanks to our NativeCamera plugin!

Again the Unity store is amazing the resources it holds and the ability to speed up your projects, however it is also extremely important to understand how things actually do work eventually.

See you next post!

--

--