I’m a bit short on time, I was wondering if it’s possible to downgrade unity versions of a project without breaking my scene. My scene only consists of unity primitives so I figured it might be possible.
I’ve tried opening it already, but the hierarchy shows items with no names or components when I drag my scene in.
The error log is full of these errors:
MetaData class can't be loaded```
I need to downgrade in order to build the .unity3d file for an older version of a game, and I have a backup so I can revert to 2017 if need be. Is there anyway I can build for older versions of unity?
Officially, downgrading is not supported, but it does work in many cases. Before opening the project in the older version, I would make sure to delete the Library folder. Then just open the project with the old version and hope for the best.
The shown error log is only a warning telling you that the metadata is invalid and needs to be rebuild, but this is why I would suggest deleting the Library folder completely before trying to downgrade, so Unity can rebuild the cache cleanly.
However, there is still the issue of serialized YAML that may not be compatible with the old Unity version. In the best case, the YAML hasn’t changed, since Unity uses lazy serialization. Meaning, for example, if a new property was introduced to e.g. the Collider component, it will only be serialized if its default value changes. If this is the case, the data can be downgraded, since it hasn’t changed. If you’ve changed any of the newly introduced data fields, then these changes cause issues with the old serializer. In the second-best case, the changes are simply ignored, but I’ve also seen entire GameObjects disappear or scenes not opening at all.
If this is really important and the project isn’t too large or the issues are only a few, you can also try to manually fix the YAML. In this case, I’d try to get my hand on files that you’ve created in the old version and then diff them against the same file in the new Unity version. This way you could create a list of properties that have changed and try to remove them manually. Did this once for a prefab where only a single property was causing issues.
Thank you for your detailed reply.
In the end, it turns out that even though there were empty game objects, it preserved transform details on each of them, so I could re-apply materials and components and re-name everything painstakingly.
You have taught me a little about Unity so thank you anyway!