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. Dismiss Notice

Bug Found in Unity LTS version 2020.3.5f1

Discussion in 'Editor & General Support' started by megabrobro, May 25, 2021.

  1. megabrobro

    megabrobro

    Joined:
    Jul 8, 2017
    Posts:
    109
    So I had strange problems in my WIP game. I am not an expert and so spent many hours thinking my code/settings were to blame.

    It turns out to be a bug in that Unity version. I updated to 2020.3.9.f1 and the problem was no longer there.

    Thing is, what does 'LTS' actually mean to us then? I was under the illusion LTS meant it would be a pretty bug-free experience. But this bug was quite nasty and I can only imagine it has caused other people loss of time/work also.

    Thread discussing problem was here: c# - Unity DontDestroyOnLoad not always working after Android build - Game Development Stack Exchange
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    If LTS meant bug free, then they wouldn't keep releasing new versions. What bugs are they fixing with each release if it was already bug free?

    LTS means they don't include new features or API changes, which are a common source for new bugs. They focus on bug fixes and platform support, with tighter controls on what gets checked in.

    That said, DontDestroyOnLoad has been pretty stable. My suspicion would be that your Start is for some reason not getting called, rather than DontDestroyOnLoad being broken.
     
  3. Lurking-Ninja

    Lurking-Ninja

    Joined:
    Jan 20, 2015
    Posts:
    9,907
    There is no such thing as "bugfree" software. Ever, anywhere. Just take a look at the Mars rover. They had to update the software after landing. Even there. And they had billions of dollars to test everything before launch.

    It doesn't work like that.

    More stable environment. You won't be bothered by new, shiny features, introducing more bugs. And you will get bug fixes for certain amount of time.
     
    Joe-Censored likes this.
  4. megabrobro

    megabrobro

    Joined:
    Jul 8, 2017
    Posts:
    109

    I assumed they'd had enough time to ensure that particular build was free from bugs. Of course they can still introduce new bugs but as the build has been around a long time, it seemed like the safer choice than going for bleeding edge or just the latest official releases.

    For the record I am going to continue on the LTS branch, until I have a better understanding of all the tools (c#, unity etc) so that I will know the difference between Unity bugs and bugs in my own code.
     
  5. megabrobro

    megabrobro

    Joined:
    Jul 8, 2017
    Posts:
    109
    I am still uncertain if it is a bug. The problem went away after update, but actually resurfaced again eventually. In the end I now put all the DontDestroyOnLoad(gameObject) calls in one place (ie. in my GAME_MANAGER.cs, which runs just once and stays in memory throughout the program).


    @Joe-Censored . Thanks for the hint about Start() maybe not being called. What could cause Start() to not be called on that particular script? I had 4 canvas objects and it was happening to two of them and not the other two :|
     
  6. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,002
    It is a safer choice (especially if it's not a new LTS and is like ~10 versions in), just not as much as Unity claims / people believe.
     
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Start will not be called if the GameObject or the component is not active. Also, Start does not get called immediately, it gets called after the current frame ends. I'm not sure what happens if you call loadscene on the same frame that you activate this object, whether after the frame ends if Start gets called on the object, or the object gets destroyed due to the scene change first. Just speculating.
     
    megabrobro likes this.
  8. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Unity puts out new LTS releases about every week or 2. Unity is extremely complicated software with lots of interactions between different systems possible. It is not possible to test it all. They must be using automation for the majority of the testing, and an inherent limitation of automation is it will only find problems you're already looking for. New, even fairly obvious issues, which you don't already have a test for, often slip through automated testing. (my day job is software QA)