Add cleaning up modules from target files when deleted.

This commit is contained in:
Chandler Cox
2024-08-27 14:54:21 -05:00
parent e5f0e05d43
commit 3bffc927f6
2 changed files with 72 additions and 0 deletions

View File

@@ -704,6 +704,10 @@ namespace FlaxEditor.Modules
}
else
{
// try to remove module if build.cs file is being deleted
if (item.Path.Contains(".Build.cs", StringComparison.Ordinal) && item.ItemType == ContentItemType.Script)
Editor.Instance.CodeEditing.RemoveModule(item.Path);
// Check if it's an asset
if (item.IsAsset)
{