diff --git a/Editor/Util.cs b/Editor/Util.cs index b144ad6..e0b3c58 100644 --- a/Editor/Util.cs +++ b/Editor/Util.cs @@ -1095,8 +1095,9 @@ public static bool AssetPathExists(string assetPath) public static bool AssetPathIsEmpty(string assetPath) { const string emptyGuid = "00000000000000000000000000000000"; + string pathGUID = AssetDatabase.AssetPathToGUID(assetPath); - return AssetDatabase.AssetPathToGUID(assetPath).Equals(emptyGuid); + return (pathGUID.Equals(emptyGuid) || string.IsNullOrEmpty(pathGUID)); } public static bool HasMaterialKeywords(GameObject obj, params string[] keywords)