Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Enter the 2020.2 Beta Sweepstakes for a chance to win an Oculus Quest 2.
    Dismiss Notice

Unity 5.4.0 b3 "GetLocalizedString is not allowed to be called during serialization"

Discussion in '5.4 Beta' started by Daniel4, Jan 28, 2016.

  1. Daniel4

    Daniel4

    Joined:
    Sep 19, 2014
    Posts:
    13
    Hi,
    I upgraded recently from latest official release to the beta one because i have some problems with my mouse cursor in WebGL, and AssetBundle shaders.
    Now, when i load my scene, the game runs, but gives an error:
    GetLocalizedString is not allowed to be called during serialization, call it from Awake or Start instead. Called from script 'TreeData' on game object 'Tree Data'.
    See "Script Serialization" page in the Unity Manual for further details


    It points at a tree mesh data, which is just a simple tree gameobject .
    I tried rebuilding the tree prefab but doesn't help.

    The release log of this beta says: 2D: Fix error log 'GetLocalizedString is not allowed...'
    But this seems to be a 3D problem?
    Thanks
     
  2. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,616
    This should be a harmless editor-only message. As far as I know, should be fixed in one of upcoming betas.
     
  3. LG

    LG

    Joined:
    Jan 2, 2013
    Posts:
    1
    This is blocking me from building (as the error constitutes a build break), ideas?
     
  4. mihaipopescu

    mihaipopescu

    Unity Technologies

    Joined:
    Nov 24, 2015
    Posts:
    6
    Making TextContent/GUIContent static may fix the issue.
     
  5. ForceVFX

    ForceVFX

    Joined:
    Jan 21, 2011
    Posts:
    585
    This is now causing build failures, on android - two of my plugins, PoolBoss from the core game kit, and TexturePacker plugin I bought for sprites.....no line number on the error, I could not find the actual cause of the failure...

    Sheesh...this code has been working for two years.

    No more beta versions for me..
    Way too frustrating.

    I actually got two builds to run,but I switched off graphics auto api, which rebuilt the project, and now for some reason...build errors..restared unity, my computer....

    Stuck..

    P
     
  6. aliakbo

    aliakbo

    Joined:
    Jan 28, 2012
    Posts:
    35
    A workaround for this seems to be to close the animation window!
     
  7. F-R

    F-R

    Joined:
    May 4, 2008
    Posts:
    76
    Place a tree somewhere in every scene you have and you shouldn't get those errors anymore. i is a very old known bug so downgrading won't solve the issue.
     
unityunity