Remove ability to delete content and source folders. Limit CM options on those folders only to ones that make sense.

This commit is contained in:
Chandler Cox
2023-11-21 12:03:01 -06:00
parent 98012eb192
commit 317886e893
3 changed files with 24 additions and 6 deletions

View File

@@ -24,6 +24,11 @@ namespace FlaxEditor.Content
/// </summary>
protected ContentFolder _folder;
/// <summary>
/// Whether this node can be deleted.
/// </summary>
protected virtual bool _canDelete => true;
/// <summary>
/// Gets the content folder item.
/// </summary>
@@ -301,7 +306,7 @@ namespace FlaxEditor.Content
StartRenaming();
return true;
case KeyboardKeys.Delete:
if (Folder.Exists)
if (Folder.Exists && _canDelete)
Editor.Instance.Windows.ContentWin.Delete(Folder);
return true;
}