class InstantiateSceneObjectUndoableCommand

Inherits: UndoableOperation

Instantiates scene object(s) from a prefab and allows you to delete them as an undo operation.

Public

Constructors

InstantiateSceneObjectUndoableCommand

InstantiateSceneObjectUndoableCommand(PrivatelyConstruct, const String &description, const HPrefab &prefab)

Methods

staticExecute

static HSceneObject Execute(const SPtr<UndoRedo> &undoRedo, const HPrefab &prefab, const String &description = StringUtility::kBlank)

Instantiates the specified prefab.

Automatically registers the operation with undo/redo system.

undoRedo
Undo/redo system to register the operation with.
prefab
Prefab to instantiate.
description
Optional description of what exactly the operation does.

Returns: Instantiated object.

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

Fields

mPrefab

HPrefab mPrefab

mSceneObject

HSceneObject mSceneObject