Table of Contents

Class ProjectAssetDeletion

Namespace
Stride.Core.Assets
Assembly
Stride.Core.Assets.dll

Decides what undo and redo do to the delete of a project asset. The disk may have changed since the delete, so they follow the disk, and they never delete a file that the user may still want.

public static class ProjectAssetDeletion
Inheritance
object
ProjectAssetDeletion

Methods

Redo(bool, bool, bool)

Decides whether a redo of the delete removes the asset.

public static bool Redo(bool isDeleted, bool deletedOutside, bool fileExists)

Parameters

isDeleted bool

Whether the asset is deleted now.

deletedOutside bool

Whether the delete came from outside Game Studio.

fileExists bool

Whether the file of this asset exists.

Returns

bool

False if the asset stays: a file that is back after a delete from outside keeps its asset, or a save could delete it.

Undo(bool, bool, bool)

Decides what an undo of the delete does.

public static ProjectAssetUndoAction Undo(bool isDeleted, bool fileHasAnotherAsset, bool fileExists)

Parameters

isDeleted bool

Whether the asset is deleted now. A file that came back may have restored it already.

fileHasAnotherAsset bool

Whether another asset now has the file or the location of this asset.

fileExists bool

Whether the file of this asset exists.

Returns

ProjectAssetUndoAction