diff --git a/Assets/UniGLTF/Runtime/UniGLTF/IO/UnityPath.cs b/Assets/UniGLTF/Runtime/UniGLTF/IO/UnityPath.cs index ec853fb0b..522537072 100644 --- a/Assets/UniGLTF/Runtime/UniGLTF/IO/UnityPath.cs +++ b/Assets/UniGLTF/Runtime/UniGLTF/IO/UnityPath.cs @@ -155,7 +155,10 @@ namespace UniGLTF if (string.IsNullOrEmpty(Value)) return PathType.Unsupported; var directory = Path.GetDirectoryName(Value); - if (string.IsNullOrEmpty(directory)) return PathType.Unsupported; + if (string.IsNullOrEmpty(directory)){ + // #1941 + return PathType.Assets; + } var rootDirectoryName = directory.Split(Path.DirectorySeparatorChar); @@ -430,13 +433,9 @@ namespace UniGLTF public void ImportAsset() { - if (Value == "Assets") - { - return; - } if (!IsUnderWritableFolder) { - throw new NotImplementedException(Value); + throw new NotImplementedException(); } AssetDatabase.ImportAsset(Value); }