Camera Plugin made easy with Unity!

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!




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

What is Headless Commerce?

Refactoring long methods, a simple example

Deploy Flask website using AWS CLI with AWS Lambda, AWS API Gateway and Zappa

Leading a Wakatime Leaderboard using a $2 microcontroller and < 50 lines of code.

Microservices vs Monolith: Which is the way to go?

Enclave Protocol — Workflow

Be a Rock Star at Pull Requests

How to Build Web Applications in Java Using Servlet and JSP?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Edward Kim

Edward Kim

More from Medium

Tessellation in HDRP

Unity new Input System : Tips to create a “clean” Player Input System(Part XI)

Adding a camera shake effect

Create a Diablo Style Character Controller in Unity!