Search Unity

Too much text?

Discussion in 'Immediate Mode GUI (IMGUI)' started by shawnpigott, Mar 18, 2011.

  1. shawnpigott

    shawnpigott

    Joined:
    Sep 28, 2005
    Posts:
    262
    I'm working on a project that uses blocks of text up to 3500 words. Unfortunately I just received this error message.

    Optimized GUI Block text buffer too large. Not appending further text.
    UnityEditor.DockArea:OnGUI()

    I tried breaking up my text in to smaller chucks but I'm still getting the error message.

    Here's the basic script.
    Code (csharp):
    1. function OnGUI () {
    2.     GUI.skin = mySkin;
    3.    
    4.     // Begin the ScrollView
    5.     scrollPosition = GUI.BeginScrollView (Rect (50, 60, Screen.width-100, Screen.height-130), scrollPosition, Rect (0, 0,  Screen.width-120, CompleteLength));
    6.  
    7.     // Story
    8.     GUI.Label (Rect (0, 0, Screen.width-120, StoryLength), StoryText);
    9.    
    10.     // Story Cont
    11.     GUI.Label (Rect (0, StoryLength + 50, Screen.width-120, StoryLength1), StoryText1);
    12.    
    13.     // Story Cont
    14.     GUI.Label (Rect (0, StoryLength + StoryLength1 + 100, Screen.width-120, StoryLength2), StoryText2);
    15.    
    16.     //Icon
    17.     GUI.Label (Rect (Screen.width/2-92, StoryLength + StoryLength1 + StoryLength2 + StoryIconSpread, 64, 64), BikoIconBlack);
    18.    
    19.     //Author Bio
    20.     GUI.Label (Rect (0, StoryLength + StoryLength1 + StoryLength2 + StoryBioSpread, Screen.width-120, BioLength), AuthorBio);
    21.  
    22.     // End the ScrollView
    23.     GUI.EndScrollView();
    24.    
    25.     //Title text
    26.     GUI.Label (Rect (50 , 10, 500, 50), StoryTitle, customGuiStyle);
    27.    
    28.     //Home
    29.     if (GUI.Button (Rect (Screen.width/2-50,Screen.height - 100, 128, 128), MapIcon)) {
    30.         Application.LoadLevel ("MainMenu");
    31.     }
    32. }
    Any suggestions or workarounds?
     
    Last edited: Mar 18, 2011
  2. shawnpigott

    shawnpigott

    Joined:
    Sep 28, 2005
    Posts:
    262
    Last edited: Mar 18, 2011
  3. lbalasubbaiahapps

    lbalasubbaiahapps

    Joined:
    Oct 6, 2011
    Posts:
    23