Larusso / unity-version-manager

A commandline application to manage unity versions
Apache License 2.0
23 stars 6 forks source link

Improve unity version parsing #370

Closed Larusso closed 2 years ago

Larusso commented 2 years ago

Description

Unity versions always come with two components:

To install and locate the install resources we need both parts. In the past a webservice was used to locate the missing hash by providing a simple mapping. Since Unity 2019 the project settings file declares the project version in two styles:

m_EditorVersion: 2020.3.38f1
m_EditorVersionWithRevision: 2020.3.38f1 (8f5fde82e2dc)

The newer m_EditorVersionWithRevision version already contains the hash/revision (unity itself is not clear how to name this ...) I updated the version fromString parser to parse the optional revision when provided. I opted to parse 2 styles. the aformentioned project settings style and also the UnityHub url style 2020.3.38f1/8f5fde82e2dc.