【问题标题】:Unity3D WebCamTexture graphicsFormat value doesn't existUnity3D WebCamTexture graphicsFormat 值不存在
【发布时间】:2021-06-16 18:17:21
【问题描述】:

我想检查我的 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。

【问题讨论】:

    标签: c# unity3d graphics texture2d


    【解决方案1】:

    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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-12-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-11
      相关资源
      最近更新 更多