#include <SliceMetadataEntityContextComponent.h>
Inherits AZ::Component, AzFramework::EntityContext, AZ::SliceInstanceNotificationBus::Handler, SliceMetadataEntityContextRequestBus::Handler, AzToolsFramework::ToolsApplicationEvents::Bus::Handler, and AZ::SliceMetadataInfoNotificationBus::MultiHandler.
|
| AZ_COMPONENT (SliceMetadataEntityContextComponent, "{F53BF27D-9A95-41CC-BA2F-6496F9BC0C6B}") |
|
| SliceMetadataEntityContextComponent () |
|
| ~SliceMetadataEntityContextComponent () override=default |
|
void | Activate () override |
|
void | Deactivate () override |
|
AzFramework::EntityContextId | GetSliceMetadataEntityContextId () override |
|
void | ResetContext () override |
|
void | GetRequiredComponentTypes (AZ::ComponentTypeList &required) override |
|
bool | IsSliceMetadataEntity (const AZ::EntityId entityId) override |
|
AZ::Entity * | GetMetadataEntity (const AZ::EntityId entityId) override |
|
AZ::EntityId | GetMetadataEntityIdFromEditorEntity (const AZ::EntityId editorEntityId) override |
|
AZ::EntityId | GetMetadataEntityIdFromSliceAddress (const AZ::SliceComponent::SliceInstanceAddress &address) override |
|
void | AddMetadataEntityToContext (const AZ::SliceComponent::SliceInstanceAddress &, AZ::Entity &entity) override |
|
System component responsible for owning the edit-time slice metadata entity context
The slice metadata entity context that creates and manages entities associated with slice instances. The components on these entities collect, pre-compute, and store useful metadata associated with slices. Unlike existing entity contexts, it doesn't not provide an interface for managing its contents and does not make use of the root slice provided by the base entity context.
- Note
- This class may be moved to the Framework for use in the game runtime.
◆ SliceMetadataEntityContextComponent()
AzToolsFramework::SliceMetadataEntityContextComponent::SliceMetadataEntityContextComponent |
( |
| ) |
|
Default Constructor - Establishes required components for entities belonging to the context
◆ ~SliceMetadataEntityContextComponent()
AzToolsFramework::SliceMetadataEntityContextComponent::~SliceMetadataEntityContextComponent |
( |
| ) |
|
|
overridedefault |
◆ AddRequiredComponents()
void AzToolsFramework::SliceMetadataEntityContextComponent::AddRequiredComponents |
( |
AZ::Entity & |
entity | ) |
|
|
protected |
This context requires that entities added to it have certain components. This function will add those component to any entity passed to it, if needed.
- Parameters
-
entity | Any component entity that's going to belong to this context. |
◆ GetDependentServices()
static void AzToolsFramework::SliceMetadataEntityContextComponent::GetDependentServices |
( |
AZ::ComponentDescriptor::DependencyArrayType & |
dependent | ) |
|
|
static |
Component Descriptor - Dependent Services
- Parameters
-
dependent | An array to fill out with all the services this component depends on |
◆ GetIncompatibleServices()
static void AzToolsFramework::SliceMetadataEntityContextComponent::GetIncompatibleServices |
( |
AZ::ComponentDescriptor::DependencyArrayType & |
incompatible | ) |
|
|
static |
Component Descriptor - Incompatible Services
- Parameters
-
incompatible | An array to fill out with all the services this component is incompatible with |
◆ GetProvidedServices()
static void AzToolsFramework::SliceMetadataEntityContextComponent::GetProvidedServices |
( |
AZ::ComponentDescriptor::DependencyArrayType & |
provided | ) |
|
|
static |
Component Descriptor - Provided Services
- Parameters
-
provided | An array to fill out with all the services this component provides |
◆ Reflect()
static void AzToolsFramework::SliceMetadataEntityContextComponent::Reflect |
( |
AZ::ReflectContext * |
context | ) |
|
|
static |
Component Descriptor - Component Reflection
- Parameters
-
context | A reflection context |
◆ RemoveMetadataEntityFromContext()
void AzToolsFramework::SliceMetadataEntityContextComponent::RemoveMetadataEntityFromContext |
( |
AZ::EntityId |
entityId | ) |
|
|
protected |
Removes the given entity from the context and cleans up the quick-reference maps If the entity is not part of this context, the function does nothing.
- Parameters
-
entityId | The ID of the entity to remove from the context. |
- Note
- This does not destroy the entity or remove it from the component application.
◆ m_editorEntityToMetadataEntityMap
AZStd::unordered_map<AZ::EntityId, AZ::EntityId> AzToolsFramework::SliceMetadataEntityContextComponent::m_editorEntityToMetadataEntityMap |
|
protected |
A quick lookup map for finding the metadata entity associated with an editor entity.
◆ m_metadataEntityByIdMap
AZStd::unordered_map<AZ::EntityId, AZ::Entity*> AzToolsFramework::SliceMetadataEntityContextComponent::m_metadataEntityByIdMap |
|
protected |
All of the entities owned by this context, keyed by their IDs.
◆ m_requiredSliceMetadataComponentTypes
AZ::ComponentTypeList AzToolsFramework::SliceMetadataEntityContextComponent::m_requiredSliceMetadataComponentTypes |
|
protected |
The list of components that entities in this context are required to have.
◆ m_sliceAddressToRootMetadataMap
AZStd::unordered_map<AZ::SliceComponent::SliceInstanceAddress, AZ::EntityId> AzToolsFramework::SliceMetadataEntityContextComponent::m_sliceAddressToRootMetadataMap |
|
protected |
A quick lookup map for finding the metadata entity associated with the given slice instance.
The documentation for this class was generated from the following file: