简体   繁体   English

Unity3D WebCamTexture graphicsFormat 值不存在

[英]Unity3D WebCamTexture graphicsFormat value doesn't exist

I wanted to check which UnityEngine.Experimental.Rendering.GraphicsFormat my WebCamTexture is using.我想检查我的 WebCamTexture 正在使用哪个 UnityEngine.Experimental.Rendering.GraphicsFormat。

WebCamTexture webCam = new WebCamTexture();
Debug.Log($"Graphics Format is {webCam.graphicsFormat}");

The output is Graphics Format is 88 but 88 does not seem to be in the GraphicsFormat enum, which goes up to 86 and then continues at 96. output 是Graphics Format is 88但 88 似乎不在 GraphicsFormat 枚举中,它上升到 86 然后继续为 96。

So which format is the WebCamTexture using?那么 WebCamTexture 使用哪种格式?

EDIT: I am using Unity 2019.4.21f1 for this project.编辑:我在这个项目中使用 Unity 2019.4.21f1。

88 is ARGB32 , even though it's not part of the named enum values. 88 是ARGB32 ,即使它不是命名枚举值的一部分。

Edit: the full list of undocumented options is as follows:编辑:未记录选项的完整列表如下:

  • Alpha8 54阿尔法8 54
  • ARGB32 88 ARGB32 88
  • YUY2 141 YUY2 141
  • ASTC_HDR_4x4 145 ASTC_HDR_4x4 145
  • ASTC_HDR_5x5 146 ASTC_HDR_5x5 146
  • ASTC_HDR_6x6 147 ASTC_HDR_6x6 147
  • ASTC_HDR_8x8 148 ASTC_HDR_8x8 148
  • ASTC_HDR_10x10 149 ASTC_HDR_10x10 149
  • ASTC_HDR_12x12 150 ASTC_HDR_12x12 150
  • PVRTC_2BPP_RGBA 108875872 PVRTC_2BPP_RGBA 108875872

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM