Navigation
API > API/Plugins > API/Plugins/MassAIBehavior
Subsystem that keeps track of the LookAt targets
| Name | UMassLookAtSubsystem |
| Type | class |
| Header File | /Engine/Plugins/AI/MassAI/Source/MassAIBehavior/Public/MassLookAtSubsystem.h |
| Include Path | #include "MassLookAtSubsystem.h" |
Syntax
UCLASS (MinimalAPI)
class UMassLookAtSubsystem : public UMassTickableSubsystemBase
Inheritance Hierarchy
- FTickableObjectBase → FTickableGameObject → UTickableWorldSubsystem → UMassTickableSubsystemBase → UMassLookAtSubsystem
- UObjectBase → UObjectBaseUtility → UObject → USubsystem → UWorldSubsystem → UTickableWorldSubsystem → UMassTickableSubsystemBase → UMassLookAtSubsystem
Structs
| Name | Remarks |
|---|---|
| FRequest | Struct representing a request for a given entity to perform a LookAt action |
| FViewerRequest | Struct to facilitate processing request per viewer entity. |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveRequestsFreeList | TArray< int32 > | List of available indices in ActiveRequests (to preserve stable indices when unregistering requests) | MassLookAtSubsystem.h | |
| PerViewerRequests | TArray< FViewerRequest > | Per viewer entity representation of all the active requests | MassLookAtSubsystem.h | |
| RegisteredRequests | TArray< FRequest > | List of all currently registered requests as registered by external systems | MassLookAtSubsystem.h | |
| RequestArchetype | FMassArchetypeHandle | Cached archetype to create entities representing a LookAt request | MassLookAtSubsystem.h | |
| RequestHandleToIndexMap | TMap< FMassEntityHandle, int32 > | Used for lookup in RegisteredRequests, since that array can get large, and linear search would kill performance rather quickly. | MassLookAtSubsystem.h | |
| RequestsAccessDetector | FRWAccessDetector | Multithread access detector to detect threading issues with any list of requests | MassLookAtSubsystem.h | |
| TargetArchetype | FMassArchetypeHandle | Cached archetype to create entities representing a LookAt target | MassLookAtSubsystem.h | |
| TargetGrid | UE::Mass::LookAt::FTargetHashGrid2D | Hierarchical 2D hash grid of registered entities representing LookAt targets. | MassLookAtSubsystem.h | |
| TargetGridAccessDetector | FRWAccessDetector | Multithread access detector to detect threading issues with the hash grid | MassLookAtSubsystem.h | |
| ViewerHandleToIndexMap | TMap< FMassEntityHandle, int32 > | Used for lookup in PerViewerRequests, since that array can get large, and linear search would kill performance rather quickly. | MassLookAtSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UE::Mass::LookAt::FTargetHashGrid2D::FCellLocation AddTarget
(
const FMassEntityHandle InEntity, |
Adds new item to the grid for a given entity handle representing a LookAt target. | MassLookAtSubsystem.h | |
void BatchMoveTarget
(
const TArrayView< TTuple< const FMassEntityHandle, FMassLookAtTargetFragment&, const FBox > > InUpd... |
Moves multiple items based on their entity handle, cell location and new bounding box. | MassLookAtSubsystem.h | |
FMassLookAtRequestHandle CreateLookAtActorRequest
(
AActor* ViewerActor, |
Creates a new LookAt request using the provided parameters for the mass entity associated to 'ViewerActor', if any. | MassLookAtSubsystem.h |
|
FMassLookAtRequestHandle CreateLookAtPositionRequest
(
AActor* ViewerActor, |
Creates a new LookAt request using the provided parameters for the mass entity associated to 'ViewerActor', if any. | MassLookAtSubsystem.h |
|
int32 DebugGetRegisteredTargetCount() |
MassLookAtSubsystem.h | ||
const FMassArchetypeHandle & DebugGetRequestArchetype() |
MassLookAtSubsystem.h | ||
FString DebugGetRequestsString
(
FMassEntityHandle InEntity |
MassLookAtSubsystem.h | ||
const FMassArchetypeHandle & DebugGetTargetArchetype() |
MassLookAtSubsystem.h | ||
void DeleteRequest
(
FMassLookAtRequestHandle RequestHandle |
Removes given request from the active LookAt requests. | MassLookAtSubsystem.h |
|
UE::Mass::LookAt::FTargetHashGrid2D::FCellLocation MoveTarget
(
const FMassEntityHandle InEntity, |
Moves item based on the entity handle, its previous cell location and its new bounding box. | MassLookAtSubsystem.h | |
bool Query
(
const FBox& InQueryBox, |
Returns entity that potentially touch the bounds. Operates on grid level, can have false positives. | MassLookAtSubsystem.h | |
void RegisterRequests
(
const FMassExecutionContext& InContext, |
Appends the provided requests to the active ones, then updates the LookAt fragments of the referenced entity if required. | MassLookAtSubsystem.h | |
void RemoveTarget
(
const FMassEntityHandle InEntity, |
Removes item based on the entity handle and the cell location it was added with. | MassLookAtSubsystem.h | |
void UnregisterRequests
(
const FMassExecutionContext& InContext, |
Unregisters the provided requests from the list of active ones, then updates the LookAt fragments of the referenced entity if required. | MassLookAtSubsystem.h |
Protected
Overridden from USubsystem
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Initialize
(
FSubsystemCollectionBase& Collection |
MassLookAtSubsystem.h |
Overridden from FTickableObjectBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStatId GetStatId() |
MassLookAtSubsystem.h |