Search Unity

4.6 GUI BUG REPORT

Discussion in 'Immediate Mode GUI (IMGUI)' started by SubZeroGaming, Oct 1, 2014.

  1. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    When you have multiple text gameObjects on the screen, if you change the material via script, or any functionality via script, it effects every text object in the scene.

    If via script I change just the text of the textObject i want to change....it works perfect....but if i change the material, it effects all of them. Also, if i fade one textObject, they all fade.

    so yeah....
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    What code are you using exactly? TextMesh.color ?
     
  3. SubZeroGaming

    SubZeroGaming

    Joined:
    Mar 4, 2013
    Posts:
    1,008
    No,

    private Text _txt;

    in void start i'm doing:

    _txt = getcomponent<text>()

    _txt.text = "Hey what's up";
    _txt.material.color = Color.red;

    The changing of the text only effects this one text object, but when i change the color, all of the text objects turn red.