Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Official Unity 2022 LTS Is Now Available

Discussion in 'Announcements' started by TreyK-47, May 30, 2023.

  1. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,158
    Had a fun bug - load scene the first time, everything works. Return to main menu and load scene again, I get null reference errors due to transforms I've cached in variables not being accessible even though they are right there in the scene and worked just fine the first time. Replaced transforms with vector3 positions and everything works. No code is setting the transforms so I can only deduce this is some Unity weirdness.
     
  2. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Unfortunately still crashing after pressing play.
     
  3. ClawbearGames

    ClawbearGames

    Joined:
    Dec 13, 2018
    Posts:
    15
    makaka-org and koirat like this.
  4. Koji-Nakamaru

    Koji-Nakamaru

    Joined:
    Aug 24, 2015
    Posts:
    7
    How long Unity 2022 LTS will be supported?

    https://unity.com/releases/lts says: "The 2022 LTS releases will receive biweekly fixes until mid-2023, then monthly updates until mid-2024."

    sc1.png

    On the other hand, https://unity.com/ja/releases/editor/qa/lts-releases says: "We’re committed to supporting 2022 LTS releases with biweekly updates until mid-2024, after which updates will be monthly until mid-2025 (two years after the initial release date)."

    sc2.png
     
  5. LTS releases are supported for two years from the date of release (except for industry customers, who have 3 years support AFAIK).
    2022LTS came out May 30, 2023, which means it will be supported mid-year 2025.
     
  6. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    1,012
    EDIT: Silly me this happens when you have jetbrains open and attach to unity :p
     
    Last edited: Nov 26, 2023
  7. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,158
    It's weird that Unity "recommends" 2022.3.15f1 yet no release notes exist anywhere, even in the new release notes alpha page.
     
  8. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    12,015
    I’m confused by this, do LTS builds exist that only industry clients get?
     
  9. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,568
    Its out now
     
  10. PanthenEye

    PanthenEye

    Joined:
    Oct 14, 2013
    Posts:
    2,158
    I can download it, I just don't know what's in it.
     
  11. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,568
    Yea super annoying I agree
     
  12. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    427
    Hi, after switching from 2021 LTS to 2022 LTS I see a MASSIVE delay with the inspector when drawing certain components.
    For example, selecting a character in the hierarchy triggers an Inspector.InitOrRebuild action that can last up to 30 seconds or more. This was almost instantanious in 2021 so, it's a step backward for me, making it very difficult to work.
    The issue seems to be related with fields referencing custom classes that use the [System.Serializable] attribute. And it happens even when the fields are marked as [HideInInspector] but not when they're marked as [NonSerialized]. Obviously, I need to serialize them and display them. Any idea what change may have triggered this behavior?
    I haven't been able to fix it, for days now, and it has even crashed my graphics card.
     
    Last edited: Jan 22, 2024
    Lars-Steenhoff likes this.
  13. DragonCoder

    DragonCoder

    Joined:
    Jul 3, 2015
    Posts:
    1,789
    To investigate, try reproducing this in a fresh project.
    If it's not reproducible, have you deleted the library folder and done a full asset-reimport on your project after updating?
     
  14. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    427
    Thanks, I found that the issue is linked to fields marked with the [SerializeReference] attribute. I'm still investigating if there was misuse on my part, and how exactly it gets triggered. But anyone seeing this behavior after upating, should backup and check if removing this attribute improves inspector re-building times.
     
  15. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,824
    Did you meant 2021?
     
  16. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    427
    Yeah, thanks for pointing that out.

    THE ISSUE:
    The issue comes when you try to serialize both-ways references. Like for example: say I have a Serializable Character, that has a field for it's Serializable Inventory. In the past, if I wanted to be able to access the character form the inventory, I could do something like this:
    Code (CSharp):
    1. [HideInInspector][SerializeReference] SerializableCharacter owner; //Serialized reference to the owner of this inventory
    In 2022 this code leads to the behavior I mentioned: a huge wait to re-build the inspector.
    It seems it triggers a cyclic serialization at some point.
    Is that use a misuse on my part, or there's a mistake in the new unity?
     
    Last edited: Jan 22, 2024
  17. altepTest

    altepTest

    Joined:
    Jul 5, 2012
    Posts:
    1,199
    check if you have nested prefabs on that character
     
  18. calpolican

    calpolican

    Joined:
    Feb 2, 2015
    Posts:
    427
    Well, for sure I have nested prefabs in my character. Nested prefabs are not forbbiden and probably a requisite in any complex project. They don't slow things down as much as when you have, say, an instance of a prefab in every scene (because then every time you save the prefab it has to get every scene, get that prefab instance and pass the changes). But what's important here is that this issue is not present in unity 2021 with the same project untouched, the same character, the same nested prefabs, etc.
    I had to revered back to 2021 because of this problem.
    Still, I'd like to say that I think that this issue might be linked with junk serialized from erased fields in custom serialized classes.
    Let me explain: Say that I have a custom serializable class and by mistake I try to serialize a monobehavior. After compiling I get and error, and noticing this mistake I erase the field. That field and the data serialized from it, with all the junk, IS still there. As anyone knows, if you add a field, serialize the data and delete the field, then bring it back, the serialized data is still there. This is done to keep the Undo feature and the "Formerly Serialized As". But there's no way to prune it, and as far as I know, this garbage is never deleted. If you have a project like mine where you've been working in it for years, every day, trying things and testing them, then it's possible that you've collected lots of junk in your components, and some of it, may cause severe problems if, say, they do something bad, like a circular logic. The catch is that once you wrote it by mistake, it'll keep there even if you've removed it.
    I think that something was triggering a very expensive operation during serialization, but the field doing it was erased (because I was never able to find it). That's what I suspected, but I no longer can test it out, as I went back to 2021.
     
    Last edited: Feb 29, 2024
  19. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    8,647
    @calpolican Are you using any custom inspector tools to make use of
    [SerializeReferene]
    ? I use SerializeReference extensively, including in situations with cyclical references and haven't experience this kind of behaviour. Though I have been using 2023 a lot more than 2022.
     
    Last edited by a moderator: Mar 3, 2024
    Ryiah likes this.
  20. r618

    r618

    Joined:
    Jan 19, 2009
    Posts:
    1,319
    AssetDatabase.ForceReserializeAssets();
    should/will serialize reflecting current c# state only
     
  21. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,262
    I have seen a change in document between 2022.2 and 2022.3 about PluginsForIOS (Actually most of .2 to .3 in every version seem to be changed)

    https://docs.unity3d.com/2022.2/Documentation/Manual/PluginsForIOS.html
    https://docs.unity3d.com/2022.3/Documentation/Manual/PluginsForIOS.html

    There is an information about
    Tips for iOS:
    specifically this point

    This whole block seem to be missing from the new version of documentation about plugin for ios. So I don't know if these information still hold or actually already outdated. And what is the state of string return in ios ?

    Is it possible to provide sample of ios function to return string and other kind of pointer things from ios to unity in the documentation ? Or is it exist somewhere already?
     
  22. Spy-Master

    Spy-Master

    Joined:
    Aug 4, 2022
    Posts:
    908
    https://docs.unity3d.com/2022.3/Documentation/Manual/ios-native-plugin-bonjour-sample.html
    Key points:
    iPhoneNativeCodeSample/Assets/Plugins/iOS/BonjourClientImpl.mm
    - MakeStringCopy
    - CreateNSString
    - _StartLookup
    - _GetLookupStatus
    iPhoneNativeCodeSample/Assets/Plugins/Bonjour.cs
     
    Thaina likes this.
  23. Thaina

    Thaina

    Joined:
    Jul 13, 2012
    Posts:
    1,262
    Thank you very much. I try to find string about
    Mono marshalling
    and cannot found it, turn out it just become small note there