Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

3D text scripting

Discussion in 'Scripting' started by yangmeng, Jun 25, 2007.

  1. yangmeng

    yangmeng

    Joined:
    Dec 5, 2006
    Posts:
    573
    I am having trouble scripting 3d text. With GUI text this kind of script works:
    Code (csharp):
    1. guiText.material.color = Color.black;
    but what is the equivalent for 3d text?
    Thanks
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    Since it's an object instead of GUIText, you'd use the same method as with other objects.

    Code (csharp):
    1. renderer.material.color = Color.black;
    --Eric
     
  3. yangmeng

    yangmeng

    Joined:
    Dec 5, 2006
    Posts:
    573
    Got it. Thanks.