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.
@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.
With certain version of Unity, ex. 2022.2.0b8 or 2023.1.0a11,
AssetDatabase.CreateFolder()
can fail when the folder name is version number like9.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.