Inherits AZ::EBusTraits.
|
virtual AzFramework::SliceInstantiationTicket | InstantiateEditorSlice (const AZ::Data::Asset< AZ::Data::AssetData > &sliceAsset, const AZ::Transform &worldTransform)=0 |
|
virtual AZ::SliceComponent::SliceInstanceAddress | CloneEditorSliceInstance (AZ::SliceComponent::SliceInstanceAddress sourceInstance, AZ::SliceComponent::EntityIdToEntityIdMap &sourceToCloneEntityIdMap)=0 |
|
virtual AZ::SliceComponent::SliceInstanceAddress | CloneSubSliceInstance (const AZ::SliceComponent::SliceInstanceAddress &sourceSliceInstanceAddress, const AZStd::vector< AZ::SliceComponent::SliceInstanceAddress > &sourceSubSliceInstanceAncestry, const AZ::SliceComponent::SliceInstanceAddress &sourceSubSliceInstanceAddress, AZ::SliceComponent::EntityIdToEntityIdMap *out_sourceToCloneEntityIdMap)=0 |
|
virtual AZ::SliceComponent::SliceInstanceAddress | PromoteEditorEntitiesIntoSlice (const AZ::Data::Asset< AZ::SliceAsset > &sliceAsset, const AZ::SliceComponent::EntityIdToEntityIdMap &liveToAssetMap)=0 |
|
virtual void | DetachSliceEntities (const EntityIdList &entities)=0 |
|
virtual void | DetachSliceInstances (const AZ::SliceComponent::SliceInstanceAddressSet &instances)=0 |
|
virtual void | DetachSubsliceInstances (const AZ::SliceComponent::SliceInstanceEntityIdRemapList &subsliceRootList)=0 |
|
virtual void | RestoreSliceEntity (AZ::Entity *entity, const AZ::SliceComponent::EntityRestoreInfo &info, SliceEntityRestoreType restoreType)=0 |
|
virtual void | ResetEntitiesToSliceDefaults (EntityIdList entities)=0 |
| Resets any slice data overrides for the specified entities.
|
|
virtual AZ::SliceComponent * | GetEditorRootSlice ()=0 |
| Retrieves the root slice for the editor entity ownership service.
|
|
|
static const AZ::EBusHandlerPolicy | HandlerPolicy = AZ::EBusHandlerPolicy::Single |
|
◆ CloneEditorSliceInstance()
virtual AZ::SliceComponent::SliceInstanceAddress AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::CloneEditorSliceInstance |
( |
AZ::SliceComponent::SliceInstanceAddress |
sourceInstance, |
|
|
AZ::SliceComponent::EntityIdToEntityIdMap & |
sourceToCloneEntityIdMap |
|
) |
| |
|
pure virtual |
Clones an existing slice instance in the editor context. New instance is immediately returned. This function doesn't automatically add the new slice instance to any entity context, callers are responsible for that.
- Parameters
-
sourceInstance | The source instance to be cloned |
sourceToCloneEntityIdMap | The map between source entity ids and clone entity ids |
- Returns
- The Address of new slice instance. A null address will be returned if the source instance address is invalid.
◆ CloneSubSliceInstance()
virtual AZ::SliceComponent::SliceInstanceAddress AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::CloneSubSliceInstance |
( |
const AZ::SliceComponent::SliceInstanceAddress & |
sourceSliceInstanceAddress, |
|
|
const AZStd::vector< AZ::SliceComponent::SliceInstanceAddress > & |
sourceSubSliceInstanceAncestry, |
|
|
const AZ::SliceComponent::SliceInstanceAddress & |
sourceSubSliceInstanceAddress, |
|
|
AZ::SliceComponent::EntityIdToEntityIdMap * |
out_sourceToCloneEntityIdMap |
|
) |
| |
|
pure virtual |
Clone an slice-instance that comes from a sub-slice, and add the clone to the root slice.
- Parameters
-
sourceSliceInstanceAddress | The address of the slice instance that contains the sub-slice instance. |
sourceSubSliceInstanceAncestry | The ancestry in order from sourceSubSlice to sourceSlice |
sourceSubSliceInstanceAddress | The address of the sub-slice instance to be cloned. |
out_sourceToCloneEntityIdMap | If valid address provided, the internal source to clone entity ID map will be returned |
- Returns
- The Address of new slice instance. A null address will be returned if the source instance address is invalid.
◆ DetachSliceEntities()
virtual void AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::DetachSliceEntities |
( |
const EntityIdList & |
entities | ) |
|
|
pure virtual |
Detaches entities from their current slice instance and adds them to root slice as loose entities.
- Parameters
-
entities | Entities to detach. |
◆ DetachSliceInstances()
virtual void AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::DetachSliceInstances |
( |
const AZ::SliceComponent::SliceInstanceAddressSet & |
instances | ) |
|
|
pure virtual |
Detaches all entities from input instances and adds them to the root slice as loose entities.
- Parameters
-
instances | SliceInstances to detach |
◆ DetachSubsliceInstances()
virtual void AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::DetachSubsliceInstances |
( |
const AZ::SliceComponent::SliceInstanceEntityIdRemapList & |
subsliceRootList | ) |
|
|
pure virtual |
Detaches the supplied subslices from their owning slice instance.
- Parameters
-
subsliceRootList | Mapping of subslice instance address to entityIdMapping |
◆ PromoteEditorEntitiesIntoSlice()
virtual AZ::SliceComponent::SliceInstanceAddress AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::PromoteEditorEntitiesIntoSlice |
( |
const AZ::Data::Asset< AZ::SliceAsset > & |
sliceAsset, |
|
|
const AZ::SliceComponent::EntityIdToEntityIdMap & |
liveToAssetMap |
|
) |
| |
|
pure virtual |
Moves existing entities in the EditorEntityOwnershipService into a new SliceInstance based off of the provided SliceAsset.
- Parameters
-
sliceAsset | Asset of the slice that the entities will be promoted into. |
liveToAssetMap | A mapping of the EntityIDs found in the provided SliceAsset and existing "live" EntityIDs found in the EditorEntityOwnershipService. |
- Returns
- Can return an empty invalid SliceInstanceAddress if an error occurs during the process.
◆ RestoreSliceEntity()
virtual void AzToolsFramework::SliceEditorEntityOwnershipServiceRequests::RestoreSliceEntity |
( |
AZ::Entity * |
entity, |
|
|
const AZ::SliceComponent::EntityRestoreInfo & |
info, |
|
|
SliceEntityRestoreType |
restoreType |
|
) |
| |
|
pure virtual |
Restores an entity back to a slice instance for undo/redo only. A valid EntityRestoreInfo must be provided, and is only extracted directly via SliceReference::GetEntityRestoreInfo().
- Parameters
-
entity | The entity to restore to the slice |
info | The EntityRestoreInfo reference to be used to restore the entity |
restoreType | The SliceEntityRestoreType |
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/Entity/SliceEditorEntityOwnershipServiceBus.h