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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

ArgumentException:GetLocalizedString etc error ... help appreciated!

Discussion in 'Editor & General Support' started by Rico87, Jul 30, 2015.

  1. Rico87

    Rico87

    Joined:
    Jul 3, 2015
    Posts:
    3
    Hi!

    We're on the latest unity build.

    So we have this problem where we load a "map" (scene) from a very basic menu with networking functionality ... here's the error :

    ArgumentException:GetLocalizedString can only be called
    from the main thread. Constructors and field initializers will be executed from the loading thread when loading a scene. Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function. TreeEditor.TreeGroupLeaf..cctor () Rethrow as TypeInitializationException: An exception was thrown by the type initializer for TreeEditor.TreeGroupLeaf

    So whenever i apply trees to my map, I get that problem until i eradicate the trees. To be noted that if i drop one or two trees and try to launch the map via the menu, it might work, if I put more, it won't, and if I keep tinkering with the few trees that once worked, they might stop at any moment (as in, from now on trigger that error when i try to launch via the menu, to be noted that if i launch directly the scene i never have any problem, it's menu/loading related).

    I searched the internet for an answer that might apply to me .. in vain, so I turn to you guys in hope for a customized answer.

    To be noted that I have tried with old packs, free packs, standard assets (which are up to date), it seemingly is not a question of "old trees assets not compatible".

    So we don't have a clue on why we get this ... any help is welcome.

    Ps : I'm not the progr so you will have to apologize any excess of noobiness :S please
     
  2. Ikoslav

    Ikoslav

    Joined:
    Jul 3, 2012
    Posts:
    7
    I just encountered the same problem.
     
  3. Rico87

    Rico87

    Joined:
    Jul 3, 2015
    Posts:
    3
    Alone in the dark we are :(
     
  4. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    Yep, same problem here.
     
  5. Rico87

    Rico87

    Joined:
    Jul 3, 2015
    Posts:
    3
  6. breakspirit

    breakspirit

    Joined:
    Aug 11, 2013
    Posts:
    30
    Did you find a solution to this? Several of the tree packs I own cause that error to get thrown when I do Application.LoadLevel into a level containing trees. It is annoying as hell.
     
  7. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    Has anyone filed a bug report on it yet?
     
  8. breakspirit

    breakspirit

    Joined:
    Aug 11, 2013
    Posts:
    30
    I filed a bug report yesterday.
     
    Nadan and Todd-Wasson like this.
  9. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Same problem here. Hopefully your report helps.
     
  10. Gua

    Gua

    Joined:
    Oct 29, 2012
    Posts:
    455
    Got Same bug

     
  11. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Still happening for me. My scene has a terrain that contains trees. Any scene without the terrain works okay. I don't want to delete them :( lol

    Any fix yet?
     
  12. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    I'm not even sure if a fix will ever come for this seeing as the unity trees were deprecated. I hope there will be but I'm not holding my breath.
     
  13. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Wait Unity trees are depricated? What is being used instead of the current tree system? We need some LOD system for terrain, right?
     
  14. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
  15. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Iiiiinteresting thanks
     
  16. Hvost239

    Hvost239

    Joined:
    Oct 3, 2013
    Posts:
    2
    I had same problem. My solution: add terrain as prefab, remove it from scene and add from prefab. Magic :)
     
    Deppex, Todd-Wasson and Nigey like this.
  17. Deppex

    Deppex

    Joined:
    May 31, 2015
    Posts:
    21
    It not works only for the first time
     
    Last edited: Dec 19, 2015
  18. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    Yep. It only works once. After I hit play a second time it breaks it again.
     
  19. marcobau

    marcobau

    Joined:
    May 12, 2015
    Posts:
    1
    You can solve putting a Tree prefab as GameObject in the scene.

    Look if there are these in the photo.

    Cattura.PNG Cattura.PNG

    But when you restart unity the problem returns :(
     
    Last edited: Dec 21, 2015
  20. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    I wrote support about this (including a link to this thread) and got a ridiculous, cookie cutter response pointing me back to the forum to find help. Apparently we're supposed to solve Unity's bugs ourselves.
     
  21. Nigey

    Nigey

    Joined:
    Sep 29, 2013
    Posts:
    1,129
    Had it been bug reported yet? Because that doesn't sound like standard Unity.
     
  22. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    I don't know. It's been reported so many times in the forums and elsewhere throughout 2015 I figure somebody must have done so by now. He couldn't be bothered to look though by the sounds of it, he just requested that I file one.

    He tried a quick test himself and came up with nothing, which would mean I might not even be able to create a repro for it. I can't send them a 30 GB project though. I've considered buying a support package but if this is the level of support I can expect then I'm not going to waste money on it. Just got to live with the bugs, I guess.
     
  23. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    It was a two part question I sent in, this was just one of them. The other was pointing out that the quality settings->billboard facing cameras checkbox does not do anything with Unity trees. Surely I'm not the first person to notice that. I was rather miffed to be told to go to the forums to seek help on that one. :confused:
     
  24. jordia

    jordia

    Joined:
    Jan 2, 2016
    Posts:
    4
    i got more than 40000 trees in the terrain ,now i have to remove them all ,but how the hell can i put 40000 trees back as objects??
     
  25. jordia

    jordia

    Joined:
    Jan 2, 2016
    Posts:
    4
  26. Todd-Wasson

    Todd-Wasson

    Joined:
    Aug 7, 2014
    Posts:
    1,077
    Do you have an English translation of that one? Chrome isn't translating it.
     
  27. jordia

    jordia

    Joined:
    Jan 2, 2016
    Posts:
    4
    I'm busy right now,i'll translate later……
     
  28. jordia

    jordia

    Joined:
    Jan 2, 2016
    Posts:
    4
    Unity3d report an error at scene loading:GetLocalizedString can only be called from the main thread.
    unity version 5.2.0f
    the reason is unsure,possibly because of some objects of the terrain。

    Solution:make the terrain as a prefab,and load it into the scene。

    Notice:use public variable to load still come to an error,the right method is by putting the prefab under the folder Resources,and use:Instantiate(Resources.Load("Scene1", typeof(GameObject))); to load .

    PS:my version is 5.3.0,it works.
     
  29. FlyAnvil

    FlyAnvil

    Joined:
    Aug 14, 2013
    Posts:
    9
  30. Orami

    Orami

    Joined:
    Mar 12, 2015
    Posts:
    20
    Closed project and reopened it and the errors went away - really weird. I am not sure what caused it, but it seems to be a hiccup in the Unity Editor itself and is solved by saving and rebooting the editor.