From 810960e4a6ddc6e2fc1de3314444cb0bad79bbb0 Mon Sep 17 00:00:00 2001 From: Thor Brigsted Date: Fri, 27 Sep 2019 18:49:11 +0200 Subject: [PATCH] Fixed #190 - OnWillDeleteAsset() conflicts with lighting data regeneration --- Scripts/Editor/NodeEditorAssetModProcessor.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Scripts/Editor/NodeEditorAssetModProcessor.cs b/Scripts/Editor/NodeEditorAssetModProcessor.cs index edaebaa..f4b14a2 100644 --- a/Scripts/Editor/NodeEditorAssetModProcessor.cs +++ b/Scripts/Editor/NodeEditorAssetModProcessor.cs @@ -1,5 +1,6 @@ using UnityEditor; using UnityEngine; +using System.IO; namespace XNodeEditor { /// Deals with modified assets @@ -9,6 +10,9 @@ namespace XNodeEditor { /// This is important to do, because you can't delete null sub assets. /// For another workaround, see: https://gitlab.com/RotaryHeart-UnityShare/subassetmissingscriptdelete private static AssetDeleteResult OnWillDeleteAsset (string path, RemoveAssetOptions options) { + // Skip processing anything without the .cs extension + if (Path.GetExtension(path) != ".cs") return AssetDeleteResult.DidNotDelete; + // Get the object that is requested for deletion UnityEngine.Object obj = AssetDatabase.LoadAssetAtPath (path);