Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::EditorOnlyEntityHandler Class Referenceabstract

#include <SliceCompilation.h>

Inherited by AzToolsFramework::UiEditorOnlyEntityHandler, and AzToolsFramework::WorldEditorOnlyEntityHandler.

Public Types

using Result = AZ::Outcome< void, AZStd::string >
 

Public Member Functions

virtual bool IsEntityUniquelyForThisHandler (AZ::Entity *entity)=0
 
virtual void AddEditorOnlyEntity (AZ::Entity *editorOnlyEntity, EntityIdSet &editorOnlyEntities)
 
virtual Result HandleEditorOnlyEntities (const AzToolsFramework::EntityList &, const AzToolsFramework::EntityIdSet &, AZ::SerializeContext &)
 

Static Public Member Functions

static Result ValidateReferences (const AzToolsFramework::EntityList &entities, const AzToolsFramework::EntityIdSet &editorOnlyEntityIds, AZ::SerializeContext &serializeContext)
 

Detailed Description

Callback handler interface for processing compiled slices prior to stripping of editor-only entities.

Member Function Documentation

◆ AddEditorOnlyEntity()

virtual void AzToolsFramework::EditorOnlyEntityHandler::AddEditorOnlyEntity ( AZ::Entity *  editorOnlyEntity,
EntityIdSet &  editorOnlyEntities 
)
inlinevirtual

Adds the given entity ID to the set of editor only entities.

Handlers can customize this behavior, such as additionally adding child entities when a parent is marked as editor-only.

Reimplemented in AzToolsFramework::UiEditorOnlyEntityHandler.

◆ HandleEditorOnlyEntities()

virtual Result AzToolsFramework::EditorOnlyEntityHandler::HandleEditorOnlyEntities ( const AzToolsFramework::EntityList &  ,
const AzToolsFramework::EntityIdSet &  ,
AZ::SerializeContext &   
)
inlinevirtual

This handler is responsible for making any necessary modifications to other entities in the slice prior to the removal of all editor-only entities. After this callback returns, editor-only entities will be removed from the slice. See WorldEditorOnlyEntityHandler below for an example of processing and validation that occurs for standard world entities.

Parameters
entitiesa list of all entities in the slice, including those marked as editor-only.
editorOnlyEntityIdsa precomputed set containing Ids for all entities within the 'entities' list that were marked as editor-only.
serializeContextuseful to inspect entity data for validation purposes.

Reimplemented in AzToolsFramework::WorldEditorOnlyEntityHandler, and AzToolsFramework::UiEditorOnlyEntityHandler.


The documentation for this class was generated from the following file: