Unity android 原生相机作为网络摄像头纹理



有人能帮我在Unity中使用Android的原生相机,就像我们使用WebcamTexture一样吗?我希望 Unity 中的"相机预览图像"作为纹理 2d 或纹理。

提前谢谢。

我曾经使用 https://bitbucket.org/Unity-Technologies/graphicsdemos 作为起点。你会对渲染插件.cpp感兴趣。

过去,我不得不使用Java代码作为Android NDK的桥梁,因为出于安全原因,无法在C级相机馈送中插入ImageReader。

看起来事情已经更新了,可以使用 https://github.com/googlesamples/android-ndk/tree/master/camera 来简化体系结构。

希望这有帮助。

ps-> 如果你想做一个代码演练,我在这里整理了一个端到端的演示 https://github.com/robsondepaula/unity-android-native-camera

最新更新