From 7ebea43654c16f63f4c80c45afb966fb76a57e0a Mon Sep 17 00:00:00 2001 From: ousttrue Date: Mon, 5 Dec 2022 15:11:36 +0900 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E3=81=AE=E6=8C=99=E5=8B=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/UniGLTF/Runtime/UniGLTF/IO/UnityPath.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); }