Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Upgrading from Unity 2019 to higher version, logging issues with Unity 2021+

Discussion in 'Editor & General Support' started by potatomasterrace, Mar 8, 2024.

  1. potatomasterrace

    potatomasterrace

    Joined:
    May 23, 2019
    Posts:
    73
    So I'm currently on Unity 2019.4.30f1 and looking to upgrade, preferably to 2022.3.21f1.

    When I tried to upgrade to 2022.3.21f1, I was able to run the game perfectly fine in the editor and it would log to the console in good time. However if I made a build it would then take over 100ms to log to file. I wrote a test script and linked the profiler to the build to show:

    logging.jpg

    I tried on different versions of Unity 2022 as well as 2021 and same issue. Upgrading to Unity 2020 however works fine and logging to file is quick like before, so some change in Unity 2021 seems to be the culprit.

    The weird thing is that occassionally a build WILL actually work fine coming from Unity 2021/2022 but I can't figure out any rhyme or reason as to why. The vast majority of the time getting this issue.

    Were some changes made to the way logging is done in Unity 2021? Any other advice on how to get to the bottom of this? The profiler only tells us as far as LogStringToConsole but can't tell us more it seems.