首页 > 编程语言 > 详细

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

时间:2015-10-22 10:36:34      阅读:1753      评论:0      收藏:0      [点我收藏+]

错误截图:

技术分享

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中出错,数组超出界限的解决办法

原文:http://www.cnblogs.com/townsend/p/4284345.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!