Skip to main content

Safe Deletion

Safe Deletion ensures you don't accidentally break your project by deleting assets or folders that are still referenced elsewhere.

Overview

The Safe Delete feature:

  • Scans for external references before deleting
  • Warns if deletion would break references
  • Only deletes if safe (no external referencers)
  • Cleans up empty parent folders automatically

How It Works

  1. Select a folder to delete
  2. The system scans for inbound dependencies (what references this folder)
  3. If external references exist, it shows the Dependency Analyzer with the results
  4. If no external references, it proceeds with deletion
  5. After deletion, empty parent folders are cleaned up

Usage

From Content Browser

  1. Right-click a folder
  2. Select Elys License Manager > Safe Delete Folder
  3. The system scans dependencies automatically
  4. If safe, a confirmation dialog appears
  5. If unsafe, the Dependency Analyzer opens showing what references the folder

Via Blueprint

UERP_AssetInsightsEditorSubsystem* Subsystem =
GEditor->GetEditorSubsystem<UERP_AssetInsightsEditorSubsystem>();

// Check if safe first
bool bSafe = Subsystem->IsFolderSafeToDelete("/Game/ToDelete");

if (bSafe)
{
bool bDeleted = Subsystem->SafeDeleteFolder("/Game/ToDelete");
}

Safety Rules

A folder is safe to delete if:

  • No external assets reference assets in this folder
  • All references are internal (within the same folder tree)

A folder is NOT safe to delete if:

  • Blueprints in other folders reference its assets
  • Materials in other folders use its textures
  • Maps include actors from this folder

Delete Empty Folders

Separate feature for cleaning up empty folders:

From Content Browser

  1. Right-click a folder
  2. Select Elys License Manager > Delete Empty Folders
  3. Scans recursively for empty folders
  4. If folders contain only redirectors, prompts to clean them first
  5. Deletes all empty subfolders

Via Blueprint

Subsystem->DeleteEmptyFolders("/Game/Content");

Troubleshooting

"Cannot delete - has references" but folder appears unused

Possible causes:

  1. Soft references - Not visible in Content Browser but still exist
  2. Redirectors - Old redirectors may still point here
  3. C++ references - Native code may reference these assets

Solution: Use the Dependency Analyzer to see exactly what references the folder.

Next Steps