Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Supporting Unity 2018, 2019 & 2020 with a single project

Discussion in 'Editor & General Support' started by devluz, Oct 9, 2020.

  1. devluz

    devluz

    Joined:
    Aug 20, 2014
    Posts:
    66
    I develop a Unity asset since 2016 and thus I am forced to support many different unity versions from 2018 LTS until the latest.

    Are there any good guidelines how you can support several versions? Ideally, via a single project.

    So far I am using the defines like UNITY_2018_4_OR_NEWER to selectively run C# code for specific versions which works great. I still regularly end up with a broken projects though. Here are some specific pains I deal with on a daily basis:

    * In Unity 2019 test framework will be loaded via manifest.json. Once the same project is opened via 2018 LTS the framework is now loaded through the manifest.json AND through a unity extension thus builds fail because the dll exists twice. Solution seems to be to either maintain several manifest.json or avoid using it. Both are not ideal.
    * Changing prefab, scene files, ... is very risky with newer Unity versions because it likely won't work with older versions anymore after editing. Not sure if there is a solution for this at all. This essentially forces me to work always with the oldest version that Unity still support cutting me off a lot of new helpful features for years.
    * So far I clean the Library folder when switching versions as this usually leads to crashes / problems if switching between Unity versions.

    Would be great to get some feedback & some tips how others deal with these issues.