在 Unity3d 中为 iPhone 和 Android 打开设备相机 [英] Open device camera for iPhone and Android in Unity3d

查看:40
本文介绍了在 Unity3d 中为 iPhone 和 Android 打开设备相机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,我需要在其中以全视图打开设备摄像头,我正在为 iOS 和 Android 制作这个应用程序.那么任何人都可以告诉我如何在 Unity 中为所有 Android 和 iPhone 设备打开全屏设备摄像头.这对我会有很大的帮助.提前致谢.

I am working an application in which i need to open device camera in full view and i am making this app for both iOS and Android. So can any one tell me that how can i open full screen device camera in Unity for all devices Android and iPhone. This will be great help for me. Thanks in advance.

推荐答案

如果你的意思是你想用相机拍摄和保存照片,我推荐 Prime31 的 iOS 和 Android 插件.不幸的是,Etcetera 插件的价格为每个平台 65 美元,但我都使用过它们,而且效果很好.

If you mean you want to use the camera to take and save photographs, I'd recommend Prime31's iOS and Android plugins. Unfortunately the Etcetera plugin is us$65 per platform, but I've used them both and they work great.

http://u3d.as/content/prime31/i-os-etcetera-plugin/2CU

http://u3d.as/content/prime31/android-etcetera-plugin/2CY

如果您只想在应用场景中显示相机的实时输出,您可以创建一个平面并使用 WebCamTexture 来显示相机的实时视频输出.

If you just want to show the camera's live output inside of your app's scene, you can create a plane and use a WebCamTexture to display the camera's live video output.

http://docs.unity3d.com/Documentation/ScriptReference/WebCamTexture.html

这篇关于在 Unity3d 中为 iPhone 和 Android 打开设备相机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆