From 30dd56a0823e0f370d775acbce06736a92c0dafb Mon Sep 17 00:00:00 2001 From: Favo Yang Date: Sun, 2 Feb 2020 10:51:15 +0800 Subject: [PATCH] fix: no warnings for missing AddressableImportSettings #15 --- Editor/AddressableImporter.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Editor/AddressableImporter.cs b/Editor/AddressableImporter.cs index c851492..6bf8495 100644 --- a/Editor/AddressableImporter.cs +++ b/Editor/AddressableImporter.cs @@ -16,7 +16,11 @@ static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAsse { var settings = AddressableAssetSettingsDefaultObject.Settings; var importSettings = AddressableImportSettings.Instance; - if (importSettings == null || importSettings.rules == null || importSettings.rules.Count == 0) + if (importSettings == null) { + Debug.LogFormat("[AddressableImporter] import settings file not found\nPlease go to Assets/AddressableAssetsData folder, right click in the project window and choose 'Create > Addressable Assets > Import Settings'."); + return; + } + else if (importSettings.rules == null || importSettings.rules.Count == 0) return; var entriesAdded = new List(); foreach (string assetPath in importedAssets)