Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Error when changing Text.text

Discussion in 'UGUI & TextMesh Pro' started by andrew-lukasik, Aug 21, 2014.

  1. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    Unity 4.6.0b17 gives me this error:

    I think (but i may be wrong) that this simple code updating Text.text string causes it and I have no idea why or how to fix it:
    Code (CSharp):
    1. void Update () {
    2.     textComponent_displayResourcesEnergy.text = Registry.mainPlayer.faction.resources[DefinitionsItems.ResourceTypes.energy].ToString("0000");
    3.     textComponent_displayResourcesData.text = Registry.mainPlayer.faction.resources[DefinitionsItems.ResourceTypes.data].ToString("0000");
    4.     textComponent_displayResourcesScience.text = Registry.mainPlayer.faction.resources[DefinitionsItems.ResourceTypes.science].ToString("0000");
    5. }
    Communicate seems clear but I don't know what to do about it. Please give me some directions where to look
     
    Last edited: Aug 21, 2014
  2. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    I found "UnityEngine.UI.CanvasUpdateRegistry" and it looks like it may have something to do with this. But it's documentation is rather scarce at the moment
     
  3. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Hi this should not be happening, can you please log a bug.
     
  4. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    Last edited: Aug 21, 2014
  5. Al3XXX

    Al3XXX

    Joined:
    Jul 13, 2014
    Posts:
    9
  6. andrew-lukasik

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    249
    In my case - next Unity build (update) fixed it completely. Try reporting it via "Help>Report a bug", it may be similar internal bug.
     
  7. Al3XXX

    Al3XXX

    Joined:
    Jul 13, 2014
    Posts:
    9
    I was trying to do it, but there are bugs without end.
     
  8. Al3XXX

    Al3XXX

    Joined:
    Jul 13, 2014
    Posts:
    9
    Holy crap: my version is 4.6beta18. But every time when I checked unity said: "All is okay. You have newest version"
    But now I see what it's not. Eh. :)
    will be trying to update.
     
    andrew-lukasik likes this.