Navigation
API > API/Editor > API/Editor/UnrealEd
The model behind a delete operation, which is an asynchronous process because of all the checks that must be performed against the GC for UObjects, and looking up references for assets through the asset registry.
| Name | FAssetDeleteModel |
| Type | class |
| Header File | /Engine/Source/Editor/UnrealEd/Public/AssetDeleteModel.h |
| Include Path | #include "AssetDeleteModel.h" |
Syntax
class FAssetDeleteModel
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Constructor | AssetDeleteModel.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FAssetDeleteModel() |
Destructor | AssetDeleteModel.h |
Classes
| Name | Remarks |
|---|---|
| FOnStateChanged | Fires whenever the state changes. |
Enums
Public
| Name | Remarks |
|---|---|
| EState | States used to manage the async deletion process. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsAnythingReferencedInMemoryByNonUndo | bool | Is any of the pending deleted assets being referenced in memory. | AssetDeleteModel.h | |
| bIsAnythingReferencedInMemoryByUndo | bool | Is any of the pending deleted assets being referenced in the undo stack. | AssetDeleteModel.h | |
| bPendingObjectsCanBeReplaced | bool | Pending objects can replaced so the 'Replace References' option should be available | AssetDeleteModel.h | |
| ObjectsDeleted | int32 | The number of objects successfully deleted. | AssetDeleteModel.h | |
| OnDiskReferences | TSet< FName > | On disk references to the currently to be deleted objects | AssetDeleteModel.h | |
| PendingDeleteIndex | int32 | A tick-to-tick state tracking variable so we know what pending deleted object we checked last. | AssetDeleteModel.h | |
| PendingDeletes | TArray< TSharedPtr< FPendingDelete > > | The assets being deleted | AssetDeleteModel.h | |
| SourceFileToAssetCount | TMap< FString, int32 > | A running count of source content filename -> number of assets referencing. | AssetDeleteModel.h | |
| State | EState | The internal progress/state of the delete model which can take several frames to recalculate deletion validity | AssetDeleteModel.h | |
| StateChanged | FOnStateChanged | Holds an event delegate that is executed when the state changes | AssetDeleteModel.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddObjectToDelete
(
UObject* InObject |
Add an object to the list of pending deleted assets, this will invalidate the scanning state. | AssetDeleteModel.h | |
bool CanDelete() |
Returns true if it is valid to delete the current objects with no problems. | AssetDeleteModel.h | |
bool CanForceDelete() |
Returns true if it is valid to force the delete of the current assets. | AssetDeleteModel.h | |
bool CanReplaceReferences() |
Returns true if it's valid to replace the references of the pending deleted objects. | AssetDeleteModel.h | |
bool CanReplaceReferencesWith
(
const FAssetData& InAssetData |
Returns true if it is valid to force the delete of the current assets with the provided asset. | AssetDeleteModel.h | |
void DeleteSourceContentFiles() |
Deletes any source content files referenced by the assets | AssetDeleteModel.h | |
bool DoDelete() |
Performs the delete if it's possible. | AssetDeleteModel.h | |
bool DoForceDelete() |
Performs a force delete on the pending deleted assets if possible. | AssetDeleteModel.h | |
bool DoReplaceReferences
(
const FAssetData& ReplaceReferencesWith |
Performs the replace references action if possible with the provided asset. | AssetDeleteModel.h | |
| Gets the packages of the assets on disk that reference the pending deleted objects; won't be accurate until the scanning process completes. | AssetDeleteModel.h | ||
int32 GetDeletedObjectCount() |
Gets the number of objects successfully deleted. | AssetDeleteModel.h | |
const TArray< TSharedPtr< FPendingDelete > > * GetPendingDeletedAssets() |
Returns the pending deleted assets. | AssetDeleteModel.h | |
const TMap< FString, int32 > & GetPendingDeletedSourceFileCounts() |
Returns a map of currently discovered source content files, and the number of times they are referenced by non-deleted assets | AssetDeleteModel.h | |
float GetProgress() |
Gets the 0..1 progress of the scanning. | AssetDeleteModel.h | |
FText GetProgressText() |
Gets the current text to display for the current progress of the scanning. | AssetDeleteModel.h | |
EState GetState() |
Returns the current state of the deletion process | AssetDeleteModel.h | |
bool GoToNextReferenceInLevel() |
Goes to the next actor in the loaded level if it is available | AssetDeleteModel.h | |
bool HasAnySourceContentFilesToDelete() |
Check whether we have any source files residing under monitored, mounted paths to delete | AssetDeleteModel.h | |
bool IsAnythingReferencedInMemoryByNonUndo() |
Is any of the pending deleted assets being referenced in memory. | AssetDeleteModel.h | |
bool IsAnythingReferencedInMemoryByUndo() |
Is any of the pending deleted assets being referenced in the undo stack. | AssetDeleteModel.h | |
bool IsAssetInPendingDeletes
(
const FName& PackageName |
Returns true if the package is one of the pending deleted assets. | AssetDeleteModel.h | |
bool IsObjectInPendingDeletes
(
const UObject* InObject |
Returns true if the object is one of the pending deleted assets. | AssetDeleteModel.h | |
FOnStateChanged & OnStateChanged() |
AssetDeleteModel.h | ||
void Tick
(
const float InDeltaTime |
Ticks the delete model which does a little work before returning so that we don't completely block when deleting a lot of things. | AssetDeleteModel.h |