
1/5

当你遇到没有自带摄像头的Android设备,需要接上USB摄像头,发现Unity的WebCamera无法识别摄像头时,可以帮你获取摄像头画面和信息。使用的是纯Java代码,并且不会因为USB摄像头接触不良造成软件崩溃闪退。这也是我遇到的问题。
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Tuanjie/Unity Version
Built-in
URP
HDRP
Tuanjie 1.8.3
Compatible
Compatible
Compatible
Tuanjie/Unity Version
Built-in
URP
HDRP
Unity 2022.3.62f3c1
Compatible
Compatible
Compatible
Description
核心功能
摄像头控制
- 获取摄像头列表,包括本机自带的和USB摄像头
- 开启/停止摄像头:支持指定摄像头 ID(StartCamera / StopCamera)
- 图像翻转:支持水平/垂直翻转(SetFlipHorizontal / SetFlipVertical)
图像获取
- 底层使用 Android Camera2 API 获取 YUV_420_888 格式帧
- 将 YUV 数据转换为 RGB24 格式(使用定点整数运算优化性能)
- 采用双缓冲机制避免读写竞争,减少 GC 压力
- Unity 侧生成 Texture2D,可直接用于 UI RawImage 展示
- 同时通过 OnUpdateImage 事件暴露原始 byte[] 帧数据
设备监测
- 每秒检查一次设备在线状态
- 若 3 秒内无新帧,判定设备离线
UCamera
Store rating
(not enough ratings)
Local data
88Views
0Favorites
Price
¥17.50
¥25
30% OFF
已享受 平台补贴
Seats
Only China users can be assigned assets. Other regions are currently not supported
License agreement
Standard Unity China Asset Store EULALicense type
For questions about the license type, please refer to the EULA.
Extension Asset
File size
19.0 KB
Latest version
1.0.0
Latest release date
2026-04-07
Supported Unity versions
2022.3.62f3c1 or higher
Supported Tuanjie versions
1.8.3 or higher
Publisher Support
854072697@qq.com
划线价说明:页面的划线价格为本资源未参与任何优惠促销活动时的日常销售价格



