#include <ContainerEntitySystemComponent.h>
Inherits AZ::Component, AzToolsFramework::ContainerEntityInterface, and EditorEntityContextNotificationBus::Handler.
|
| AZ_COMPONENT (ContainerEntitySystemComponent, "{74349759-B36B-44A6-B89F-F45D7111DD11}") |
|
void | Activate () override |
|
void | Deactivate () override |
|
ContainerEntityOperationResult | RegisterEntityAsContainer (AZ::EntityId entityId) override |
|
ContainerEntityOperationResult | UnregisterEntityAsContainer (AZ::EntityId entityId) override |
|
bool | IsContainer (AZ::EntityId entityId) const override |
| Returns whether the entity id provided is registered as a container.
|
|
ContainerEntityOperationResult | SetContainerOpen (AZ::EntityId entityId, bool open) override |
|
bool | IsContainerOpen (AZ::EntityId entityId) const override |
|
AZ::EntityId | FindHighestSelectableEntity (AZ::EntityId entityId) const override |
|
void | RefreshAllContainerEntities (AzFramework::EntityContextId entityContextId) const override |
|
ContainerEntityOperationResult | Clear (AzFramework::EntityContextId entityContextId) override |
|
bool | IsUnderClosedContainerEntity (AZ::EntityId entityId) const override |
| Returns true if one of the ancestors of entityId is a closed container entity.
|
|
void | OnEntityStreamLoadSuccess () override |
|
|
static void | Reflect (AZ::ReflectContext *context) |
|
static void | GetProvidedServices (AZ::ComponentDescriptor::DependencyArrayType &provided) |
|
System Component to track Container Entity registration and open state. An entity registered as Container is just like a regular entity when open. If its state is changed to closed, all descendants of the entity will be treated as part of the entity itself. Selecting any descendant will result in the container being selected, and descendants will be hidden until the container is opened.
◆ Clear()
ContainerEntityOperationResult AzToolsFramework::ContainerEntitySystemComponent::Clear |
( |
AzFramework::EntityContextId |
entityContextId | ) |
|
|
overridevirtual |
Clears all open state information for Container Entities for the EntityContextId provided. Used when context is switched, for example in the case of a new root prefab being loaded in place of an old one.
- Note
- Clear is meant to be called when no container is registered for the context provided.
- Returns
- An error message if any container was registered for the context, success otherwise.
Implements AzToolsFramework::ContainerEntityInterface.
◆ FindHighestSelectableEntity()
AZ::EntityId AzToolsFramework::ContainerEntitySystemComponent::FindHighestSelectableEntity |
( |
AZ::EntityId |
entityId | ) |
const |
|
overridevirtual |
◆ IsContainer()
bool AzToolsFramework::ContainerEntitySystemComponent::IsContainer |
( |
AZ::EntityId |
entityId | ) |
const |
|
overridevirtual |
◆ IsContainerOpen()
bool AzToolsFramework::ContainerEntitySystemComponent::IsContainerOpen |
( |
AZ::EntityId |
entityId | ) |
const |
|
overridevirtual |
If the entity id provided is registered as a container, it returns whether it's open.
- Note
- the default value for non-containers is true, so this function can be called without verifying whether the entityId is registered as a container beforehand, since the container's open behavior is exactly the same as the one of a regular entity.
- Returns
- False if the entityId is registered as a container, and its state is closed. True otherwise.
Implements AzToolsFramework::ContainerEntityInterface.
◆ IsUnderClosedContainerEntity()
bool AzToolsFramework::ContainerEntitySystemComponent::IsUnderClosedContainerEntity |
( |
AZ::EntityId |
entityId | ) |
const |
|
overridevirtual |
◆ RefreshAllContainerEntities()
void AzToolsFramework::ContainerEntitySystemComponent::RefreshAllContainerEntities |
( |
AzFramework::EntityContextId |
entityContextId | ) |
const |
|
overridevirtual |
◆ RegisterEntityAsContainer()
ContainerEntityOperationResult AzToolsFramework::ContainerEntitySystemComponent::RegisterEntityAsContainer |
( |
AZ::EntityId |
entityId | ) |
|
|
overridevirtual |
◆ SetContainerOpen()
ContainerEntityOperationResult AzToolsFramework::ContainerEntitySystemComponent::SetContainerOpen |
( |
AZ::EntityId |
entityId, |
|
|
bool |
open |
|
) |
| |
|
overridevirtual |
Sets the open state of the container entity provided.
- Parameters
-
entityId | The entityId whose open state will be set. |
open | True if the container should be opened, false if it should be closed. |
- Returns
- An error message if the operation was invalid, success otherwise.
Implements AzToolsFramework::ContainerEntityInterface.
◆ UnregisterEntityAsContainer()
ContainerEntityOperationResult AzToolsFramework::ContainerEntitySystemComponent::UnregisterEntityAsContainer |
( |
AZ::EntityId |
entityId | ) |
|
|
overridevirtual |
Unregisters the entity as a container. The system will retain the closed state in case the entity is registered again later, but if queried the entity will no longer behave as a container.
- Parameters
-
entityId | The entityId that will be unregistered as a container. |
Implements AzToolsFramework::ContainerEntityInterface.
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/ContainerEntity/ContainerEntitySystemComponent.h