nesrak1 / UABEA

c# uabe for newer versions of unity
MIT License
1.16k stars 149 forks source link

File Type Detector doesn't work with custom unity versions #286

Closed shalzuth closed 11 months ago

shalzuth commented 11 months ago

https://github.com/nesrak1/UABEA/blob/bd11dc53ab72538f0dbf78eb30c4b4ec243bb942/UABEAvalonia/Logic/FileTypeDetector.cs#L47

If the unity fs version is something like "2021.3.9f1-gamename", emptyVersion will resolve to "-", so https://github.com/nesrak1/UABEA/blob/bd11dc53ab72538f0dbf78eb30c4b4ec243bb942/UABEAvalonia/Logic/FileTypeDetector.cs#L54 will be false (emptyVersion.length == 1) and it's not detected as an asset file.

The fix could be as simple as removing dashes, but not sure what impact that could have on validation checks.