Do .unitypackages track the version of the project it was generated on? And does Unity allow me to install a package that created from e.g Unity 2021.3 if I’m on Unity 2019.4? Kind of like how Unity will warn you if you try to open a unity project with a different editor version.
depends, it probably would install it, if you have the file - but not everything may compile if something changed…
No.
That is, unless you create it with the Asset Store Publisher tools as a “Template” package. In that case it will include the ProjectSettings folder and this may include the project version.
Yes.
But it does not guarantee that any script or asset will work correctly. For instance the 2021 script may be using a new API method introduced in 2021 which will throw errors if you import it in 2019. Assets may also rely on newer version’s features but are less likely to break.
The way I handle stuff like this is to:
- install the newer version of Unity
- make a blank project
- import the proposed package there
- now begin to back-integrate the contents to your existing project, either one subsystem at a time, or perhaps by one folder, etc.
Generally assets like FBX or PNG files will obviously be fine. Things like Scenes and Prefabs will likely not be fine. Scripts will be somewhere in between, as already noted above.
Figuring out what works / worked / is working and what fails / failed is a time-consuming process. Keep this in mind because the main point of even buying an asset is to save time.
NOTE: always use source control on your original project so that if there is any sort of an issue it is trivial to revert back.
And if you don’t have a computer capable of the newer version, then make a blank project and try importing the new package there, and do all of the same above importation steps to your actual project.
Yes and no!
Yes in the sense that Unity will try as best as it can to import the assets, no in the sense that it’s very variable if it will work.
The versions of Unity’s data is not backwards compatible. They regularly update the versions of different importers, and create version updaters for the formats to update old data to new data. That being said, the data is stored in a text format, and as long as the names of fields are the same, they will be able to be imported fine.
As far as I can remember, if the version in the file is newer than the latest one your Unity install knows about, it will warn you that you’re trying to import a file from the future, and that it might break, but it’ll try anyway.
How important the data that is missing will of course vary a lot! So you’ll kinda just have to try your asset and see how bad it is.