问题描述
我想检查我的 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