Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

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:
    240
    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:
    240
    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,194
    Hi this should not be happening, can you please log a bug.
     
  4. andrew-lukasik

    andrew-lukasik

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

    Al3XXX

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

    andrew-lukasik

    Joined:
    Jan 31, 2013
    Posts:
    240
    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.