Migrating to Unity2022.3 LTS

Discuss coding questions, pull requests, and implementation details.
zed
Posts: 4
Joined: Tue Mar 25, 2025 12:02 am

Migrating to Unity2022.3 LTS

Post by zed »

I am currently working on a PR to migrate DFU to Unity 2022.3 LTS and bring game up from C#7.1 to C#11

The initial goal is to get the game up and running so that people can easily switch over from their previous saves to the new version without breaking most mods.

I have some long-term goals after this PR is merged:
  • Implementing some logging behavior using Cysharp.ZLogger and slowly switching the current Debug.Logs over to it per system and allow individual mods to have their own logging context.
  • Capturing and logging unhandled exceptions, etc.
  • SourceGeneration to provide mods with statically typed references to localization keys.
  • In general working on more modding tools.
That being said you can find my PR here to follow along with development.

You can also try out the changes locally through the standalone builds or by pulling down my branch and opening it in Unity. PRs are welcome.

>> Download <<
Updated on March 28th 2025.
Last edited by zed on Fri Mar 28, 2025 11:42 pm, edited 1 time in total.

User avatar
Jehuty
Posts: 4143
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Migrating to Unity2022.3 LTS

Post by Jehuty »

If people get a chance to try this with mods (especially precompiled mods), it would help to show how feasible and easy this upgrade would be. Any users who can help out with this would be very appreciated.

I've run into a problem with Immersive Mechanisms that didn't occur in the current release 1.1.1:

Code: Select all

22:36:21 [DaggerLog] [Exception] System.NullReferenceException: Object reference not set to an instance of an object
  at Immersive_MechanismsMod.Immersive_Mechanisms.AssignRandomNameToNextObjects (DaggerfallWorkshop.DaggerfallAction daggerfallAction, System.String randomName, System.Random random) [0x000b5] in <d04aa09d264742fa928c584cc15828d2>:0 
  at Immersive_MechanismsMod.Immersive_Mechanisms.IdentifyDungeonChildren () [0x00230] in <d04aa09d264742fa928c584cc15828d2>:0 
  at Immersive_MechanismsMod.Immersive_Mechanisms.Update () [0x000b8] in <d04aa09d264742fa928c584cc15828d2>:0 
  at Immersive_MechanismsMod.Immersive_Mechanisms.AssignRandomNameToNextObjects (DaggerfallWorkshop.DaggerfallAction daggerfallAction, System.String randomName, System.Random random) [0x000b5] in <d04aa09d264742fa928c584cc15828d2>:0 
  at Immersive_MechanismsMod.Immersive_Mechanisms.IdentifyDungeonChildren () [0x00230] in <d04aa09d264742fa928c584cc15828d2>:0 
  at Immersive_MechanismsMod.Immersive_Mechanisms.Update () [0x000b8] in <d04aa09d264742fa928c584cc15828d2>:0 
I'll have to see how reproducible this is, but at least we're showing signs.

zed
Posts: 4
Joined: Tue Mar 25, 2025 12:02 am

Re: Migrating to Unity2022.3 LTS

Post by zed »

Jehuty wrote: Tue Mar 25, 2025 4:29 am I've run into a problem with Immersive Mechanisms that didn't occur in the current release 1.1.1:
Image

I'm seeing this reported back in February on the nexus page and I am also unable to reproduce it in the editor. It happens in the standalone build though.

User avatar
Jehuty
Posts: 4143
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Migrating to Unity2022.3 LTS

Post by Jehuty »

Whoops. Let's overlook that one then :lol: But I will request that anyone capable, try running their mods on this version! The experience so far as been extremely similar to 1.1.1 and it would be a big help.

User avatar
King of Worms
Posts: 4832
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Migrating to Unity2022.3 LTS

Post by King of Worms »

Hi, thanks for your work, I will test it and report back. I have some 70 mods in my modlist.

EDIT: so, the only error Ive seen mentioned in the red text at the bottom is the mod UI backdrop ( https://www.nexusmods.com/daggerfallunity/mods/961 ) - it says its already loaded. And it states that, even when I disable the mod in the ingame settings.

Other thing Ive noticed is, that SOME of the interior lights are now back to default, meaning the Improved Interior Light mod has some issues. It happens only on torches. I have not investigated more. Maybe it just needs different load order, as I also use the NoMoreLEDlights mod, which affects exterior lights. It worked properly on 1.1.1 tho...

3rd thing is, that the script in DREAM which deals with the dynamic paperdoll backgrounds, seems to be not working anymore. Scipt is here, in case anyone wants to take a look:
TODBackgrounds.rar
(8.01 KiB) Downloaded 491 times
Im not sure if other mods are affected, but I have not noticed it, during the brief test.

zed
Posts: 4
Joined: Tue Mar 25, 2025 12:02 am

Re: Migrating to Unity2022.3 LTS

Post by zed »

King of Worms wrote: Wed Mar 26, 2025 3:32 pm
EDIT: so, the only error Ive seen mentioned in the red text at the bottom is the mod UI backdrop ( https://www.nexusmods.com/daggerfallunity/mods/961 ) - it says its already loaded. And it states that, even when I disable the mod in the ingame settings.
I still need to look into comparing lights with and without mods but I cannot reproduce your issue with UIBackdrop in editor or standalone linux64.

Image
Image
King of Worms wrote: Wed Mar 26, 2025 3:32 pm Other thing Ive noticed is, that SOME of the interior lights are now back to default, meaning the Improved Interior Light mod has some issues. It happens only on torches. I have not investigated more. Maybe it just needs different load order, as I also use the NoMoreLEDlights mod, which affects exterior lights. It worked properly on 1.1.1 tho...
I'm not noticing any issues in editor or the standalone build related to lighting. The mods seem to work without errors, though NoMoreLEDs warns of possible incompatibility with other lighting mods. I'm running both in my screenshots together. ILL loaded before NoMoreLEDLights w/ all default mod settings.
PR: Vanilla Light vs Light Mods
PR: Vanilla Light vs Light Mods
1.1.1 vs PR: No Light mods
1.1.1 vs PR: ILL+LED
King of Worms wrote: Wed Mar 26, 2025 3:32 pm 3rd thing is, that the script in DREAM which deals with the dynamic paperdoll backgrounds, seems to be not working anymore. Scipt is here, in case anyone wants to take a look:
TODBackgrounds.rar
At a glance everything seems fine with the above script, but my guess is that the new nullable types flag in the compiler and or the reflection is no longer valid or is potentially going to break in the near future as methods get changed to have explicit support for nullable types in their parameters and return types.

User avatar
jayhova
Posts: 946
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: Migrating to Unity2022.3 LTS

Post by jayhova »

I've always thought it was pretty important to keep DFU updated to a reasonably current version of Unity. The whole purpose of DFU was to make it usable on a current OS with current hardware.
Remember always 'What would Julian Do?'.

User avatar
jayhova
Posts: 946
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: Migrating to Unity2022.3 LTS

Post by jayhova »

I know migrating to unity 6 would likely be a big deal
Remember always 'What would Julian Do?'.

zed
Posts: 4
Joined: Tue Mar 25, 2025 12:02 am

Re: Migrating to Unity2022.3 LTS

Post by zed »

jayhova wrote: Thu Mar 27, 2025 4:47 am I've always thought it was pretty important to keep DFU updated to a reasonably current version of Unity. The whole purpose of DFU was to make it usable on a current OS with current hardware.
This PR mostly stems from my personal needs in order to work on DFU as the current editor version isn't playing well with my desktop environment. Editor tooling just appearing as black boxes, whole editor freezing and crashing after 10min of usage, etc.
jayhova wrote: Fri Mar 28, 2025 4:29 pm I know migrating to unity 6 would likely be a big deal
I haven't used Unity6 yet but I know there are some big changes such as the rendering pipeline that would probably maka it less trivial to upgrade from 2019->6. If we need to in the future we can do another upgrade from 2022.3->6

New release and download link in the OP

User avatar
AncientGrief
Posts: 14
Joined: Wed Jun 22, 2022 8:28 am
Location: Germany

Re: Migrating to Unity2022.3 LTS

Post by AncientGrief »

I tested Dream 90s with the latest build.

Paperdoll backgrounds change correctly for me.

EDIT: No Problems with DREAM too
My Mods:
DaggerBlood- Adds more blood to DFU
Immersive Journal with AI - Writes a journal for you
Piece of Chalk
Custom Class Bonus points

https://next.nexusmods.com/profile/Exco ... ameId=2927

Post Reply