首页 > 解决方案 > 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 个一维数组。

标签: unity3d

解决方案


推荐阅读