From bf69c34cfc747379f5a8a73ae5bdf5eacce55779 Mon Sep 17 00:00:00 2001 From: 0b5vr <0b5vr@0b5vr.com> Date: Mon, 20 Feb 2023 17:02:14 +0900 Subject: [PATCH] refactor: the same unityPath can be used for three of them --- Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs index e50c3b853..4aa6197d6 100644 --- a/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs +++ b/Assets/VRM/Editor/Format/vrmAssetPostprocessor.cs @@ -17,11 +17,13 @@ namespace VRM { foreach (string path in importedAssets) { - if (!UnityPath.FromUnityPath(path).IsFileExists) { + var unityPath = UnityPath.FromUnityPath(path); + + if (!unityPath.IsFileExists) { continue; } - if (UnityPath.FromUnityPath(path).IsStreamingAsset) + if (unityPath.IsStreamingAsset) { Debug.LogFormat("Skip StreamingAssets: {0}", path); continue; @@ -32,7 +34,7 @@ namespace VRM { try { - ImportVrm(UnityPath.FromUnityPath(path)); + ImportVrm(unityPath); } catch (NotVrm0Exception) {