Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceCompilation.cpp
EditorOnlyEntityHandler* FindHandlerForEntities(const AZ::SliceComponent::EntityList& entities, const EditorOnlyEntityHandlers& editorOnlyEntityHandlers)
        {
            EditorOnlyEntityHandler* editorOnlyEntityHandler = nullptr;
            for (auto handlerCandidate : editorOnlyEntityHandlers)
            {
                const bool handlerInvalid = handlerCandidate == nullptr;
                if (handlerInvalid)
                {
                    continue;
                }

                // See if this handler can handle at least one of the entities.
                for (AZ::Entity* entity : entities)
                {
                    if (handlerCandidate->IsEntityUniquelyForThisHandler(entity))
                    {
                        editorOnlyEntityHandler = handlerCandidate;
                        break;
                    }
                }

                const bool editorOnlyHandlerValid = editorOnlyEntityHandler != nullptr;
                if (editorOnlyHandlerValid)
                {
                    break;
                }
            }

            return editorOnlyEntityHandler;
        }
//! Iterates through the list of entities for each handler provided and returns the first handler
//! that can handle at least one of the entities in the list.
//!
//! We currently don't have support the concept of using multiple handlers for a given list of
//! entities. So once a handler is found, we assume that it can handle all of the entities in
//! the list.
//!
//! This may not always be true if the list contains world entities and UI element entities, for
//! example - so this may need udpating eventually.
Iterates through the list of entities for each handler provided and returns the first handler
that can handle at least one of the entities in the list.

We currently don't have support the concept of using multiple handlers for a given list of
entities. So once a handler is found, we assume that it can handle all of the entities in
the list.

This may not always be true if the list contains world entities and UI element entities, for
example - so this may need udpating eventually.
Iterates through the list of entities for each handler provided and returns the first handler that can handle at least one of the entities in the list . We currently don ' t have support the concept of using multiple handlers for a given list of entities . So once a handler is found we assume that it can handle all of the entities in the list . This may not always be true if the list contains world entities and UI element entities for example - so this may need udpating eventually .
EditorOnlyEntityHandler* FindHandlerForEntities(const AZ::SliceComponent::EntityList& entities, const EditorOnlyEntityHandlers& editorOnlyEntityHandlers)
        {
            EditorOnlyEntityHandler* editorOnlyEntityHandler = nullptr;
            for (auto handlerCandidate : editorOnlyEntityHandlers)
            {
                const bool handlerInvalid = handlerCandidate == nullptr;
                if (handlerInvalid)
                {
                    continue;
                }
                for (AZ::Entity* entity : entities)
                {
                    if (handlerCandidate->IsEntityUniquelyForThisHandler(entity))
                    {
                        editorOnlyEntityHandler = handlerCandidate;
                        break;
                    }
                }
                const bool editorOnlyHandlerValid = editorOnlyEntityHandler != nullptr;
                if (editorOnlyHandlerValid)
                {
                    break;
                }
            }
            return editorOnlyEntityHandler;
        }
EditorOnlyEntityHandler * FindHandlerForEntities ( const AZ :: SliceComponent :: EntityList & entities , const EditorOnlyEntityHandlers & editorOnlyEntityHandlers ) { EditorOnlyEntityHandler * editorOnlyEntityHandler = nullptr ; for ( auto handlerCandidate : editorOnlyEntityHandlers ) { const bool handlerInvalid = handlerCandidate == nullptr ; if ( handlerInvalid ) { continue ; } for ( AZ :: Entity * entity : entities ) { if ( handlerCandidate -> IsEntityUniquelyForThisHandler ( entity ) ) { editorOnlyEntityHandler = handlerCandidate ; break ; } } const bool editorOnlyHandlerValid = editorOnlyEntityHandler != nullptr ; if ( editorOnlyHandlerValid ) { break ; } } return editorOnlyEntityHandler ; }
Iterates through the list of entities for each handler provided and returns the first handler
that can handle at least one of the entities in the list.
Iterates through the list of entities for each handler provided and returns the first handler that can handle at least one of the entities in the list .
// See if this handler can handle at least one of the entities.