Upgrading Project to Unity 2018.1.2f1

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
User avatar
Interkarma
Posts: 2885
Joined: Sun Mar 22, 2015 1:51 am

Upgrading Project to Unity 2018.1.2f1

Post by Interkarma » Fri Apr 13, 2018 12:17 am

Hi All,

I've been working through issues around upgrading project from Unity 5.5 to 2017.3 2018.1.2f1. This will also lay the groundwork for a future upgrade to Unity 2018.x whenever this is out of beta and proven stable.

Edit: See second post for further updates.

Following are some notes on what I need to fix so far. I might add to this over time if I find anything else. Documenting here so contributors are aware of the process and that an upgrade to 2017.3 will be coming in future.
  • MCS iCode Compiler (Resolved) - Probably the main issue is the MCS compiler is broken in Unity 2017.3. There's a manual workaround for this here which works well for game to build and run normally. Assuming that mods will continue to work as normal as the "mcs.dll" itself is uchanged with this workaround, just an alias is being added. However, it's still necessary to patch the .csproj every time Unity generates it. There's a way to automate this as well, but I'd prefer to see a proper fix patch from MCS code maintainers before pulling the trigger on this upgrade.
  • Materials Suddenly Specular (Resolved) - The default materials now have a tight specular shine without any mods or changes in place. Assuming this won't be too hard to fix and I just need some updates to how procedural Standard shader materials are generated at runtime.
  • iTween Deprecated Calls (Resolved) - The older version of iTween library (used to move platforms, doors, etc.) is calling some now deprecated functions. This is easy to fix by either updating iTween or just commenting out deprecated functions. None of these are used by Daggerfall Unity anyway.
Other than the above everything is running great in Unity 2017.3 (so far). The procedural terrain collider initialisation problem where player falls through ground upon loading external save for first time is also resolved in this version.

User avatar
Interkarma
Posts: 2885
Joined: Sun Mar 22, 2015 1:51 am

Re: Upgrading Project to Unity 2017.2.2f

Post by Interkarma » Wed May 02, 2018 5:31 am

After some further work on resolving problems above, I've decided to set the new baseline at Unity 2017.2.2f1. This is the last version before we encounter problems with with MCS iCode Compiler right now.

While it's possible to overcome the MCS iCode issue using the manual workaround linked above, I'd rather wait for a more integrated fix if possible before moving to Unity 2017.3 or later. I'll review this again later.

Contributors: You can download Unity 2017.2.2f1 from here to get ready for the change. I still have some more testing to do before proceeding. I'll give you all notice once I'm happy enough to set a date. Note that you can install multiple versions of Unity side-by-side by specifying a different install folder. There is no need to remove Unity 5.5 version.

Testers: Following is a test build created by Unity 2017.2.2f1. Please have a play with it and let me know any feedback or problems (that aren't already present in current builds) - material issues, mod problems, that kind of thing.

http://www.dfworkshop.net/static_files/ ... 20%231.zip

The above build is for testers on Windows x64, which is the majority. Builds will be made available to the normal big three platforms after change to Unity 2017.2.2f1 is complete.


Known Issues
  • Mods using asset bundles (.dfmod file) might need to be rebuilt for new version. For example, the Enhanced Sky mod now just shows a pink sky as materials do not load correctly from this asset bundle in latest Unity version. Rebuilding bundle with 2017.2.2f1 should resolve, but the author (Lypyl) hasn't been around in a while and status of mod source is unknown.

User avatar
TheLacus
Posts: 569
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Upgrading Project to Unity 2017.2.2f

Post by TheLacus » Wed May 02, 2018 5:16 pm

Interkarma wrote:
Wed May 02, 2018 5:31 am
After some further work on resolving problems above, I've decided to set the new baseline at Unity 2017.2.2f1. This is the last version before we encounter problems with with MCS iCode Compiler right now.
2017.2.2f1, Assets/Game/Addons/CSharpCompiler/CodeCompiler.cs(17,33): error CS0246: The type or namespace name `ICodeCompiler' could not be found. Are you missing an assembly reference?.
Should be defined in System.CodeDom.Compiler. Not sure if i'm supposed to upgrade something?

Anyway, this is great news. Now we can also use the new Video player.
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

User avatar
Interkarma
Posts: 2885
Joined: Sun Mar 22, 2015 1:51 am

Re: Upgrading Project to Unity 2017.2.2f1

Post by Interkarma » Wed May 02, 2018 8:00 pm

Don't forget to set full .net (not subset) in player settings. That's the same for 5.5 as well. I linked the problem I'm discussing in the first post, which only manifests from 2017.3 onward. :)

User avatar
TheLacus
Posts: 569
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: Upgrading Project to Unity 2017.2.2f1

Post by TheLacus » Wed May 02, 2018 9:42 pm

Interkarma wrote:
Wed May 02, 2018 8:00 pm
Don't forget to set full .net (not subset) in player settings. That's the same for 5.5 as well. I linked the problem I'm discussing in the first post, which only manifests from 2017.3 onward. :)
yep, i forgot it thanks
If you are interested in creating mods for Daggerfall Unity you can find the documentation here.

User avatar
Interkarma
Posts: 2885
Joined: Sun Mar 22, 2015 1:51 am

Re: Upgrading Project to Unity 2017.2.2f1

Post by Interkarma » Sun May 20, 2018 10:52 pm

Right now, my only blocking issue for Unity upgrade is that I know it will break the Enhanced Sky mod. Unfortunately Lypyl hasn't been around lately and has not made the source for his mod available as far as I'm aware. The Enhanced Sky stuff on his git repo appears to be the older built-in version from before mod system existed.

Lypyl, are you still around mate? I'd love for this awesome mod of yours to get an update to be compatible with later Unity versions.

User avatar
Interkarma
Posts: 2885
Joined: Sun Mar 22, 2015 1:51 am

Re: Upgrading Project to Unity 2017.2.2f1

Post by Interkarma » Fri May 25, 2018 5:56 am

I'm locking in Unity 2017.2.2f1 upgrade for June 15 2018. This will include the code on GitHub, so developers should download and install a copy of this Unity version for and ensure their clone of the repository is up to date after that date. I will also issue new Live Builds on the day.

One of the most popular mods (Enhanced Sky) is unfortunately not compatible with this change. It would be a simple fix if I had the source project for this mod, but unfortunately do not and and the creator has not been present in some time. This inevitably means the mod will is unsupported in a few weeks.

Other mod creators might need to repackage their mods using the new Unity version as well.

User avatar
Hazelnut
Posts: 575
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Upgrading Project to Unity 2017.2.2f1

Post by Hazelnut » Fri May 25, 2018 4:50 pm

There may be a minor issue with choosing that version of Unity editor in that there doesn't appear to have been a Linux version released. It looks like they jumped from 2017.2.0f3 to 2017.3.0f1 on the Linux versions.

Any idea what the consequences of using 2017.2.0f3 instead of 2017.2.2f1 would be?

Most of my DFU work is done on windows but it has been nice to be able to use my Linux laptop for development as well, although it's really not a big deal if I can't use it anymore. Not sure if any other developers / modders use Linux?

It's a real shame that we'll lose the enhanced sky mod too. I really hope LypyL can make the code available for someone else to maintain. I've never even tried it, but it looks amazing in pics.

User avatar
Interkarma
Posts: 2885
Joined: Sun Mar 22, 2015 1:51 am

Re: Upgrading Project to Unity 2017.2.2f1

Post by Interkarma » Fri May 25, 2018 8:58 pm

It will work OK in 2017.3 and up, you'll just need to use the MCS iCode workaround I linked earlier up.

As soon as those guys have a better fix for that I'll bump to 2017.3 or 2017.4.

One of the main issues I want to fix from 5.5 is a known bug between CharacterController and physics system where collisions just stop working. Player can intermittently walk through buildings, suddenly fall through a block in dungeons, or fall into abyss when loading a game or exiting a building.

I'm a bit unhappy to lose Enhanced Sky as well. But I can't hold back the whole project on account of one mod. :(

User avatar
Hazelnut
Posts: 575
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Upgrading Project to Unity 2017.2.2f1

Post by Hazelnut » Fri May 25, 2018 10:17 pm

Interkarma wrote:
Fri May 25, 2018 8:58 pm
It will work OK in 2017.3 and up, you'll just need to use the MCS iCode workaround I linked earlier up.
Ok, thanks.

Post Reply