From c156b5c0a7ba668d5a6d0dc3bfd05fa18eae71f3 Mon Sep 17 00:00:00 2001 From: miuleung Date: Tue, 13 Aug 2024 16:05:20 +0800 Subject: [PATCH] Fix File Dialog Cancel Error Log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 选择文件时取消报错修复 --- .../Editor/PackageImporter/PackageImporterWindow.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Assets/YooAsset/Samples~/Extension Sample/Editor/PackageImporter/PackageImporterWindow.cs b/Assets/YooAsset/Samples~/Extension Sample/Editor/PackageImporter/PackageImporterWindow.cs index 690a7f8..9d53e28 100644 --- a/Assets/YooAsset/Samples~/Extension Sample/Editor/PackageImporter/PackageImporterWindow.cs +++ b/Assets/YooAsset/Samples~/Extension Sample/Editor/PackageImporter/PackageImporterWindow.cs @@ -29,9 +29,8 @@ namespace YooAsset.Editor if (GUILayout.Button("选择补丁包", GUILayout.MaxWidth(150))) { string resultPath = EditorUtility.OpenFilePanel("Find", "Assets/", "bytes"); - if (string.IsNullOrEmpty(resultPath)) - return; - _manifestPath = resultPath; + if (!string.IsNullOrEmpty(resultPath)) + _manifestPath = resultPath; } EditorGUILayout.LabelField(_manifestPath); EditorGUILayout.EndHorizontal();