unity3d - Unity 中的“文本缓冲区太大”错误
问题描述
在我的 Unity 项目中,我收到一个错误,例如“优化的 GUI 块文本缓冲区太大。未附加更多文本。UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)” 我尝试将不必要的公共对象和字符串转换为私有但我仍然得到同样的错误。我仍然有 100 多个公共按钮(我应该有),以及一个大小为 205*9 的字符串数组和另一个大小为 49*13 的字符串数组。无论如何我可以摆脱这个错误吗?也许将数组拆分为更小的数组?这个错误是否会导致游戏出现任何故障?
private string[,] countriesEN=new string[201,9]{
{"ENGLAND","6","1", "Which one is the capital city of England?","Londra", "İstanbul","İzmir","Elazığ","Londra" },
{"ENGLAND","6","2", "Which currency does England use?","Pound", "Euro","Dolar","Dinar","Pound" },
{"ENGLAND","6","3", "Which of the following rivers exist in England?","Thames", "Tuna","Fırat","Nil","Thames" },
{"ENGLAND","6","4","Who is the first woman Prime Minister of United Kingdom?","Margaret Thatcher","Tansu Ciller","Golda Meir","Agatha Christie","Margaret Thatcher"}
.
.
.
.
};
我在这里留下了我的大二维字符串数组的一部分。由于它太长了,我只显示了 4 个一维数组。
解决方案
推荐阅读
- java - 在片段之间使用 ViewModel 时全局变量为空(Java-Android Studio)
- python - 如何将我在 cv2 中处理的流放入 tkinter 窗口?
- python - 你能把不同的字符串函数组合在一起吗?
- gdb - 如何在 Cygwin 中安装调试器并使用 gdb 调试 C 程序?
- css - 如何在屏幕中居中模式?
- python-3.x - 写入 WAV 文件会导致 struct.error: required argument is not an integer
- ruby-on-rails - rails c 在 Ubuntu 18.04.5 LTS 中根本无法打开
- powershell - PowerShell:如何检查为用户密码输入了多少位
- python - 在 Python 中按任何元素对嵌套列表进行排序
- html - 同时改变宽度、高度和变换会导致奇怪的过渡