错误截图:

ZXing二维码生成在Unity3D中出错,数组超出界限的解决办法

IndexOutOfRangeException: Array index is out of range.
ZXing.Color32Renderer.Render (ZXing.Common.BitMatrix matrix, BarcodeFormat format, System.String content, ZXing.Common.EncodingOptions options)
ZXing.BarcodeWriterGeneric`1[TOutput].Write (System.String contents)
UITest.Encode (System.String textForEncoding, Int32 width, Int32 height) (at Assets/UITest.cs:112)
UITest.CreatQRCodeImage (UnityEngine.Texture2D encoded, System.String textForEncoding) (at Assets/UITest.cs:119)

解决办法:

将要生成的二维码的图片如图设置

Texture Type:Advanced

Read/Write Enable 勾选

Format:RGBA32 bit

ZXing二维码生成在Unity3D中出错,数组超出界限的解决办法

 

相关文章:

  • 2022-12-23
  • 2021-11-24
  • 2022-02-04
  • 2021-12-10
  • 2022-12-23
  • 2022-01-07
猜你喜欢
  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
  • 2021-07-18
  • 2021-08-24
相关资源
相似解决方案