Search Unity

GUI-style dynamic text rendered to texture?

Discussion in 'Immediate Mode GUI (IMGUI)' started by Michael Thompson, Dec 13, 2007.

  1. Michael Thompson

    Michael Thompson

    Joined:
    Oct 15, 2007
    Posts:
    2
    Hi there,

    I'm looking for a way to get high-quality dynamic text rendered-to-texture for a data visualization project. I'm new to Unity, so I made an assumption that I'd be able to use UnityGUI Labels, laid out nicely, and then render the camera out to a texture that I apply to objects in the game. But it does not appear to work that way, as the moment I add the GUILayer to the camera, my text is on the main screen and not in the rendered texture (working exactly like it's supposed to I'll assume). Text Mesh/3D Text is not giving me the flexibility or quality I need, so I'm looking for alternatives. Does anyone have a good way of dealing with this?

    Thanks!
    Michael
     
  2. StarManta

    StarManta

    Joined:
    Oct 23, 2006
    Posts:
    8,775
    To my knowledge, there is not currently a way to get Unity GUI onto a texture. You can get text though, if you use a GUIText component (the old-style GUI which behaves very differently), you can make it render to a texture like any other object.
     
  3. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    You can use ReadPixels() to read in anything off the screen into a texture, including GUI stuff. It's kind of slow for large textures, however.

    --Eric