All Projects → robsondepaula → unity-android-native-camera

robsondepaula / unity-android-native-camera

Licence: MIT license
An experiment on drawing the Android camera feed into Unity game objects.

Programming Languages

C++
36643 projects - #6 most used programming language
java
68154 projects - #9 most used programming language
C#
18002 projects
c
50402 projects - #5 most used programming language
CMake
9771 projects
RenderScript
48 projects

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:

UnityAndroidCameraPlugin: an Android Studio project to create and AAR library as Unity Native Plugin. It includes an NDK library as the low level rendering plugin.

UnityAndroidCamera: the Unity project that integrates the plugin.

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

Setup

2020

Toolchain:

  • Android Studio 4.0.1
  • Android SDK 9.0 (API 28) Rev 6
  • Android NDK (Side by side) 21.3.6528147
  • CMake 3.4.1
  • Unity Hub 2.3.2
  • Unity 2020.1.3f1

Troubleshooting

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

Open "Build Settings" and make sure that you have switched to the "Android" platform.

This should allow you to build successfully.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].