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
- Select a folder to delete
- The system scans for inbound dependencies (what references this folder)
- If external references exist, it shows the Dependency Analyzer with the results
- If no external references, it proceeds with deletion
- After deletion, empty parent folders are cleaned up
Usage
From Content Browser
- Right-click a folder
- Select Elys License Manager > Safe Delete Folder
- The system scans dependencies automatically
- If safe, a confirmation dialog appears
- 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
- Right-click a folder
- Select Elys License Manager > Delete Empty Folders
- Scans recursively for empty folders
- If folders contain only redirectors, prompts to clean them first
- Deletes all empty subfolders
Via Blueprint
Subsystem->DeleteEmptyFolders("/Game/Content");
Troubleshooting
"Cannot delete - has references" but folder appears unused
Possible causes:
- Soft references - Not visible in Content Browser but still exist
- Redirectors - Old redirectors may still point here
- C++ references - Native code may reference these assets
Solution: Use the Dependency Analyzer to see exactly what references the folder.
Next Steps
- Dependency Scanner - Understand what references your assets
- Folder Management - Clean up empty folders