FAssetDeleteModel

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.

Windows
MacOS
Linux

References

Module

UnrealEd

Header

/Engine/Source/Editor/UnrealEd/Public/AssetDeleteModel.h

Include

#include "AssetDeleteModel.h"

Syntax

class FAssetDeleteModel

Remarks

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.

Constructors

Name Description

Public function

FAssetDeleteModel

(
    const TArray< UObject* >& InO...
)

Constructor

Destructors

Name Description

Public function

~FAssetDeleteModel()

Destructor

Functions

Name Description

Public function

void

 

AddObjectToDelete

(
    UObject* InObject
)

Add an object to the list of pending deleted assets, this will invalidate the scanning state.

Public function Const

bool

 

CanDelete()

Returns true if it is valid to delete the current objects with no problems.

Public function Const

bool

 

CanForceDelete()

Returns true if it is valid to force the delete of the current assets.

Public function Const

bool

 

CanReplaceReferences()

Returns true if it's valid to replace the references of the pending deleted objects.

Public function Const

bool

 

CanReplaceReferencesWith

(
    const FAssetData& InAssetData
)

Returns true if it is valid to force the delete of the current assets with the provided asset.

Public function

void

 

DeleteSourceContentFiles()

Deletes any source content files referenced by the assets

Public function

bool

 

DoDelete()

Performs the delete if it's possible.

Public function

bool

 

DoForceDelete()

Performs a force delete on the pending deleted assets if possible.

Public function

bool

 

DoReplaceReferences

(
    const FAssetData& ReplaceReference...
)

Performs the replace references action if possible with the provided asset.

Public function Const

const TSet< ...

 

GetAssetReferences()

Gets the packages of the assets on disk that reference the pending deleted objects; won't be accurate until the scanning process completes.

Public function Const

int32

 

GetDeletedObjectCount()

Gets the number of objects successfully deleted.

Public function Const

const TArray...

 

GetPendingDeletedAssets()

Returns the pending deleted assets.

Public function Const

const TMap< ...

 

GetPendingDeletedSourceFileCounts()

Returns a map of currently discovered source content files, and the number of times they are referenced by non-deleted assets

Public function Const

float

 

GetProgress()

Gets the 0..1 progress of the scanning.

Public function Const

FText

 

GetProgressText()

Gets the current text to display for the current progress of the scanning.

Public function Const

EState

 

GetState()

Returns the current state of the deletion process

Public function Const

bool

 

GoToNextReferenceInLevel()

Goes to the next actor in the loaded level if it is available

Public function Const

bool

 

HasAnySourceContentFilesToDelete()

Check whether we have any source files residing under monitored, mounted paths to delete

Public function Const

bool

 

IsAnythingReferencedInMemoryByNonUndo()

Is any of the pending deleted assets being referenced in memory.

Public function Const

bool

 

IsAnythingReferencedInMemoryByUndo()

Is any of the pending deleted assets being referenced in the undo stack.

Public function Const

bool

 

IsAssetInPendingDeletes

(
    const FName& PackageName
)

Returns true if the package is one of the pending deleted assets.

Public function Const

bool

 

IsObjectInPendingDeletes

(
    const UObject* InObject
)

Returns true if the object is one of the pending deleted assets.

Public function

FOnStateChan...

 

OnStateChanged()

Public function

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.

Classes

Name

Description

Public class

FOnStateChanged

Fires whenever the state changes.

Enums

Name

Description

Public enum

EState

States used to manage the async deletion process.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss