- Home /
Error: Optimized GUI Block text buffer
Hello! I get the following error message which I can't find any information about:
Optimized GUI Block text buffer too large. Not appending further text. UnityEngine.GUIStyle:Internal_Draw(IntPtr, Rect, String, Texture, Boolean, Boolean, Boolean, Boolean) UnityEngine.GUIStyle:Internal_Draw(IntPtr, Rect, String, Texture, Boolean, Boolean, Boolean, Boolean) UnityEngine.GUIStyle:Draw(Rect, GUIContent, Int32, Boolean) UnityEditor.EditorGUI:DoTextField(RecycledTextEditor, Int32, Rect, String, GUIStyle, String, Boolean&, Boolean, Boolean, Boolean) UnityEditor.EditorGUI:TextField(Rect, GUIContent, String, GUIStyle) UnityEditor.EditorGUI:TextField(Rect, GUIContent, String) UnityEditor.EditorGUI:PropertyField(Rect, SerializedProperty) UnityEditor.Editor:OptimizedInspectorGUIImplementation(Rect) UnityEditor.GenericInspector:OnOptimizedInspectorGUI(Rect) UnityEditor.InspectorWindow:OnGUI() System.Reflection.MonoMethod:InternalInvoke(Object, Object[]) System.Reflection.MonoMethod:InternalInvoke(Object, Object[]) System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo) System.Reflection.MethodBase:Invoke(Object, Object[]) UnityEditor.HostView:Invoke(String) UnityEditor.DockArea:OnGUI()
[....\Editor\Src\OptimizedGUIBlock.cpp line 107]
Could anyone shed any light on this issue for me? Did you have any experiences with this error message before? Any information on possible causes would be appreciated.
Thanks Sebas
This is a good candidate for the forums because it requires some discussion and Q & A before the actual problem can be pinpointed. I would recommend rephrasing this question to be more general. If the question is more general, other users can also benefit from the answer, which is the purpose of the answers forum.
Thanks for your comment and answer, Nico. However, I still believe that error messages, especially if they're not very common or nothing can be found on them so far belong here. I was hoping for answers that would lead me to where I should be looking for my problem. I didn't want to take my project apart. I would actually appreciate if most error messages would appear here on Unity answers. As answers I would expect experiences from other users who could guide the search for my problem in my specific project. So your answer was something I'd be looking for.
If those hints and experiences from other users don't help me, I'd consider taking my project to the forums as the next step. I agree that I should have left out the specifics of my project and simply ask for any information/experiences on the error message. If you still believe the question is inappropriate here, I'd be happy to delete it to not clutter unity answers. Thanks, Sebas
Answer by Nicolaj Schweitz · Dec 30, 2009 at 06:26 PM
That is a very large block of error message you got there...
At first glance I would say that you are trying to load too much text into a text field in the GUI or perhaps you should set a buffer size that accommodate your needs or consider emptying the buffer when it reaches a certain size by writing the data to the file in smaller intervals instead of at the end of the scene. It is not that apparent to me because I am not fully aware how you do it.
Consider taking it to the forum and throw some example files/project in the pot.
Nico
Answer by Alister · Apr 04, 2011 at 08:05 PM
I had a similar error message recently:
Optimized GUI Block Text buffer too large. Not appending further text. UnityEditor.DockArea:OnGUI()
I realised that I had some string arrays (huge) for file handling, visible in the Inspector - once I made them private (i.e. no longer visible via the inspector) the error disappeared!
e.g.
var fileContents : String;
var lines : String[];
changed to:
private var fileContents : String;
private var lines : String[];
thanks Alister its working nice .my error is resolve.....
Answer by VeggieVampire · Jul 25, 2016 at 04:14 PM
I found a work around. Break your array into to different arrays. You can even have your second array start where you last one ended.
if(Assgn >=34){
InterpretationText.text = array1[Assgn];
} else {
InterpretationText.text = array2[Assgn];
}
Answer by VeggieVampire · Jul 25, 2016 at 04:14 PM
I found a work around by breaking the array in two. You can even start the second where the first array ended.
if(Assgn >=34){
InterpretationText.text = array2[Assgn];
} else {
InterpretationText.text = array[Assgn];
}
Your answer
Follow this Question
Related Questions
Loading a scene in game with a GUI 1 Answer
Instantiating object from inventory 0 Answers
Can't draw a box using Basic GUI 1 Answer
Errors when adding a GUI.Label C# 2 Answers
GUI Scale Problem 1 Answer