Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

unwanted textarea (or label) overlay [resolved]

Discussion in 'Immediate Mode GUI (IMGUI)' started by laetmo, Nov 26, 2007.

  1. laetmo

    laetmo

    Joined:
    Oct 21, 2007
    Posts:
    7
    Hi,

    I use a sample code:


    Code (csharp):
    1.  
    2.     void OnGUI ()
    3.     {
    4.         text = GUI.TextArea (new Rect (25, 25, 100, 30), text);
    5.     }
    6.  
    7.  
    with

    text = point.ToString();

    when "point" changes, the view of precedings values of "text" are visible under the current view of "text"

    Why ?
    How change this ?

    thanks by advance,
    regards.
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,773
    When do you set text= point.ToString();?
     
  3. laetmo

    laetmo

    Joined:
    Oct 21, 2007
    Posts:
    7
    I make "text = point.ToString();" in OnCollision
    text and point are class variables.

    to explain better what happens, I can say that all the texts are written in overlay...
     
  4. laetmo

    laetmo

    Joined:
    Oct 21, 2007
    Posts:
    7
    ok everybody... I am completely sorry It's my fault
    I use the same script, with my textarea in "OnGUI", on more than one active objects...
    that's why for the overlay...

    thanks to "Patricia" for the help