如何解决Unity3D WebCamTexture graphicsFormat 值不存在
我想检查我的 WebCamTexture 使用的是哪个 UnityEngine.Experimental.Rendering.GraphicsFormat。
WebCamTexture webCam = new WebCamTexture();
Debug.Log($"Graphics Format is {webCam.graphicsFormat}");
输出为 Graphics Format is 88
,但 88 似乎不在 GraphicsFormat 枚举中,它上升到 86,然后继续到 96。
WebCamTexture 使用哪种格式?
编辑:我在这个项目中使用 Unity 2019.4.21f1。
解决方法
88 是 ARGB32
,即使它不是命名枚举值的一部分。
编辑:未记录选项的完整列表如下:
- Alpha8 54
- ARGB32 88
- YUY2 141
- ASTC_HDR_4x4 145
- ASTC_HDR_5x5 146
- ASTC_HDR_6x6 147
- ASTC_HDR_8x8 148
- ASTC_HDR_10x10 149
- ASTC_HDR_12x12 150
- PVRTC_2BPP_RGBA 108875872
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。