class
BreakPrefabUndoableOperation
Inherits:
UndoableOperation
Breaks a prefab link of a scene object and allows you to undo the operation.
Public
Constructors
BreakPrefabUndoableOperation
BreakPrefabUndoableOperation(PrivatelyConstruct, const String &description, const HSceneObject &sceneObject)
Methods
~BreakPrefabUndoableOperation
~BreakPrefabUndoableOperation() noexcept
staticExecute
static void Execute(const SPtr<UndoRedo> &undoRedo, const HSceneObject &sceneObject, const String &description = StringUtility::kBlank)
Creates and executes the operation on the provided scene object.
Automatically registers the operation with undo/redo system.
- undoRedo
- Undo/redo system to register the operation with.
- sceneObject
- Scene object whose prefab link to break.
- description
- Optional description of what exactly the operation does.
Commit
void Commit() override
Applies the command, committing the change.
Revert
void Revert() override
Reverts the command, reverting the change previously done with commit().
Private
Methods
Clear
void Clear()
Clears all internal cached data.
Should be called whenever a change is commited.
Fields
mSceneObject
HSceneObject mSceneObject
mPrefabRoot
HSceneObject mPrefabRoot
mPrefabResourceId
UUID mPrefabResourceId
mPrefabDelta
SPtr<SceneObjectHierarchyDelta> mPrefabDelta