private void OnPreprocessAsset() { if (!assetImporter.importSettingsMissing) { return; } if (!IsPresetAsset(assetImporter.assetPath)) { return; } string path = Path.GetDirectoryName(assetPath); if (string.IsNullOrEmpty(path)) { return; } if (!PresetManagerStorage.IsInstanceAvailable()) { return; } PresetManagerUtils.ApplySettingsToAsset(path, assetImporter); }
static void OnPostprocessAllAssets(string[] importedAssets, string[] deletedAssets, string[] movedAssets, string[] movedFromAssetPaths) { if (!PresetManagerStorage.IsInstanceAvailable()) { return; } if (IsPresetAsset(importedAssets) || IsPresetAsset(deletedAssets)) { PresetManagerUtils.ProjectPresetsChanged(); return; } }