The first 2 immediate things that are useful to know about a Unity project are
1 — Editor Version
2 — Project Name
These can be found in the files EditorVersion.txt and ProjectSettings.Asset, respectively for modern Unity projects. These files are both found in the Project Settings folder. By modern, I mean projects that are created with Unity 2017 or later. Beginning in that version of Unity, new projects used text based serialization by default.
This type of serialization makes it much easier to extract project information. Text based asset serialization was available in earlier Unity versions, but was not set by default. Very early versions required a pro license to even use the feature. I hope to explore methods to extract information from earlier versions later in this project after some core functionality is established.
The 2 files we need are in the Project Settings folder:
The Editor Version is generally a simple text file (Unity YAML). The editor version used to create the project is found on the very first line of the file. All that is necessary to retrieve the version information is to open the file and read the first line. The information can then be formatted as desired and displayed in the program.
This above file is in UnityYAML, which is a custom-optimized YAML library. It is a subset of YAML and does not support the full YAML library.
Though it is possible to dig through the folders and files to find this information it is helpful to automate this process. Future archivists, librarians, and curators may not have the technical ability or the time to dig through a Unity Project and find this information. By running a quick scan of a project they will be able to quickly access what they may need.
Its important to know the editor version so that the project can be opened using the correct version. If the project is opened in a different version than it was developed with, it can become damaged. Unity generally is able to upgrade older but still recent projects to newer versions, however, there is no guarantee that the project will be properly imported into a new editor version. Unity itself recommends that all projects be backed up prior to upgrading to a new editor version.
Another point it that Unity does not support downgrading projects. For example, opening a project developed with Unity 2020 in say the Unity 5 or earlier editor should not be done as this type of downgrading of editor versions is not supported. Though it may seem obvious why we would not do such a thing, there is always the possibility that it could be done accidentally.
If we were to open the project in a later version of Unity, the project may accidentally be upgraded to the newer version, which could damage the project. These are examples of why we would want to know the editor version number.
Its always good to know the name of a project. Now it is important to note that the actual name of the software developed could ultimately be different. Project name is what was given at the project’s creation or later set by the developer.
The project name is found in the ProjectSettings.asset file, which is also found in the Project Settings folder. ProjectSettings.asset is a large file that contains all the settings that are configurable in the Project Settings menu in the Unity Editor. Below is an excerpt from a sample file showing the product name, which is the project name:
Searching the file and extracting this line is easy enough to do in most programming languages. Extracting these bits of information is possible from Unity 2017 projects and beyond. Earlier versions will require some testing and exploration.