Search Unity

GUIText won't clear

Discussion in 'Immediate Mode GUI (IMGUI)' started by Zaddo67, Jan 28, 2015.

  1. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    I am using GUIText component to display debug info on the screen. But once the text is written it doesn't clear, if I change the text on the component property, it just overwrites the original text and is unreadable.

    I couldn't find a solution and so I looked on the asset store for a tool that could do this job for me. I purchased SmartConsole. But guess what? it uses GUIText and does exacatly the same thing, ahhhhhh!!! :(

    Even if I destroy the Object that GUIText is attached to, it does clear from the camera. see screen shot below.

    I am using 4.6.1.

    Is there a trick to clearing the camara GUI layer with text rendered from GUIText?


    guitext.jpg
     
    Last edited: Jan 28, 2015
  2. TonyLi

    TonyLi

    Joined:
    Apr 10, 2012
    Posts:
    12,697
    Is your UI camera's Clear Flags field set to Depth Only?
     
    Zaddo67 likes this.
  3. Zaddo67

    Zaddo67

    Joined:
    Aug 14, 2012
    Posts:
    489
    Thanks that fixed it.