/unity-android-native-camera

An experiment on drawing the Android camera feed into Unity game objects.

Primary LanguageJavaMIT LicenseMIT

unity-android-native-camera

On this repository you'll find an experiment to draw the Native Android Camera feed onto a Unity GameObject.

The inspiration comes from Unity Technologies NativeRenderingPlugin.

The folder structure contains the following code:

1 An NDK library as the low level rendering plugin

2 An Android Studio project to create and AAR library as Unity Native Plugin

3 Finally, the Unity project to illustrate all the plumbing

Upon success you'll see something like the below image on your Android device: Screenshot

Troubleshooting

If you have trouble building the Unity project, please try the following:

Open "Build Settings" and make sure:

"Android" is selected in the Platform panel;
the Build System dropbox is showing "Internal".
This should allow you to build successfully.