Search Unity

GUIText Pixel Correct - Not a scriptable property?

Discussion in 'Immediate Mode GUI (IMGUI)' started by MultimediaPlusGreg, Dec 10, 2009.

  1. MultimediaPlusGreg

    MultimediaPlusGreg

    Joined:
    Jul 15, 2009
    Posts:
    23
    I'm adding a GUIText object through scripting and everything was going well until the console informed me that pixelCorrect is not a property of GUIText. My hope was to be able to set this to false so I could scale my text. After checking the reference I see that, in fact, there is no Pixel Correct property accessible by script!

    http://unity3d.com/support/documentation/ScriptReference/GUIText.html

    What's the deal? How can I possibly alter this through scripting?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Make a GUIText prefab that has pixel correct off, and instantiate that instead.

    --Eric
     
  3. MultimediaPlusGreg

    MultimediaPlusGreg

    Joined:
    Jul 15, 2009
    Posts:
    23
    Ah, thank you. More and more I'm learning that prefabs are the answer to most of these kinds of problems.
     
  4. GFX47

    GFX47

    Joined:
    Dec 7, 2010
    Posts:
    124
    I'm working on a game object components export feature and need to get the value of this "pixel correct" property via script.
    (How) is it possible?
     
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    It's not possible.

    --Eric