googlesamples / unity-jar-resolver

Unity plugin which resolves Android & iOS dependencies and performs version management
Other
1.21k stars 337 forks source link

Workaroud when `AssetDatabase.CreateFolder` failed #543

Closed chkuang-g closed 1 year ago

chkuang-g commented 1 year ago

With certain version of Unity, ex. 2022.2.0b8 or 2023.1.0a11, AssetDatabase.CreateFolder() can fail when the folder name is version number like 9.0.0. In this case, the API does not return empty guid but a guid with zeroes.

This change make sure that the folder can still be created using Directory.CreateDirectory(), which may not trigger AssetDatabase refresh in the older version of Unity.

vangogih commented 1 year ago

@a-maurice @DellaBitta hey, it's some critical bug. @CheeryLee investigated that problem and find out that it's unity bug and it reproduces in most 2022+ unity versions his message.