Navigation
API > API/Plugins > API/Plugins/MassCrowd
Inheritance Hierarchy
- UWorldSubsystem
- UMassSubsystemBase
- UMassCrowdSubsystem
References
| Module | MassCrowd |
| Header | /Engine/Plugins/AI/MassCrowd/Source/MassCrowd/Public/MassCrowdSubsystem.h |
| Include | #include "MassCrowdSubsystem.h" |
Syntax
UCLASS ()
class UMassCrowdSubsystem : public UMassSubsystemBase
Remarks
Subsystem that tracks mass entities that are wandering on the zone graph. It will create custom runtime lane data to allow branching decisions.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FDebugOnMassCrowdLaneStateChanged | DebugOnMassCrowdLaneStateChanged | ||
| FZoneGraphTagMask | DensityMask | Tag mask that represents all possible lane density tags. Built from MassCrowdSettings. | |
| TObjectPtr< const UMassCrowdSettings > | MassCrowdSettings | ||
| FDelegateHandle | OnMassCrowdSettingsChangedHandle | ||
| FDelegateHandle | OnPostZoneGraphDataAddedHandle | ||
| FDelegateHandle | OnPreZoneGraphDataRemovedHandle | ||
| FDelegateHandle | OnZoneGraphDataBuildDoneHandle | ||
| TArray< FRegisteredCrowdLaneData > | RegisteredLaneData | Per lane data for all registered ZoneGraph data. | |
| TObjectPtr< UZoneGraphAnnotationSubsystem > | ZoneGraphAnnotationSubsystem | ||
| TObjectPtr< UZoneGraphSubsystem > | ZoneGraphSubsystem |
Functions
| Type | Name | Description | |
|---|---|---|---|
| int32 | AcquireWaitingSlot
(
const FMassEntityHandle Entity, |
Acquires a slot from a specified waiting lane. Nearest vacant slot to EntityPosition is returned. | |
| void | BuildLaneData
(
FRegisteredCrowdLaneData& LaneData, |
Populates the crowd lane data array with all existing lane in the zone graph. | |
| FCrowdBranchingLaneData & | CreateBranchingData
(
const int32 LaneIndex, |
Creates dedicated structure to hold data of a branching lane. | |
| FCrowdTrackingLaneData & | CreateTrackingData
(
const int32 LaneIndex, |
Creates and initializes the occupancy data of a lane. | |
| void | CreateWaitSlots
(
const int32 CrossingLaneIndex, |
||
| const FCrowdBranchingLaneData * | GetCrowdBranchingLaneData
(
const FZoneGraphLaneHandle LaneHandle |
Returns the branching data associated to a given zone graph lane. | |
| const FRegisteredCrowdLaneData * | GetCrowdData
(
const FZoneGraphDataHandle DataHandle |
Returns the readonly runtime data associated to a given zone graph. | |
| TOptional< FZoneGraphCrowdLaneData > | GetCrowdLaneData
(
const FZoneGraphLaneHandle LaneHandle |
Returns the readonly runtime data associated to a given zone graph lane. | |
| const FCrowdTrackingLaneData * | GetCrowdTrackingLaneData
(
const FZoneGraphLaneHandle LaneHandle |
Returns the entity tracking runtime data associated to a given zone graph lane. | |
| const FCrowdWaitAreaData * | GetCrowdWaitingAreaData
(
const FZoneGraphLaneHandle LaneHandle |
Returns the waiting area runtime data associated to a given zone graph lane. | |
| FZoneGraphTagMask | |||
| float | GetDensityWeight
(
const FZoneGraphLaneHandle LaneHandle, |
Returns the weight for lane selection that is associated to the given lane based on its density tag. | |
| ECrowdLaneState | GetLaneState
(
const FZoneGraphLaneHandle LaneHandle |
Return the current state of a lane. | |
| FZoneGraphCrowdLaneData * | GetMutableCrowdLaneData
(
const FZoneGraphLaneHandle LaneHandle |
Returns the modifiable runtime data associated to a given zone graph lane. | |
| bool | HasCrowdDataForZoneGraph
(
const FZoneGraphDataHandle DataHandle |
||
| void | OnEnterTrackedLane
(
const FMassEntityHandle Entity, |
Callback to keep count of entities currently on a given lane. | |
| void | OnEntityLaneChanged
(
const FMassEntityHandle Entity, |
Callback from the lane tracker processor to indicates a mass entity changing lane. | |
| void | OnExitTrackedLane
(
const FMassEntityHandle Entity, |
Callback to keep count of entities currently on a given lane. | |
| void | PostZoneGraphDataAdded
(
const AZoneGraphData* ZoneGraphData |
||
| void | PreZoneGraphDataRemoved
(
const AZoneGraphData* ZoneGraphData |
||
| void | Clears and rebuilds all lane and intersection data for registered zone graphs using the current settings. | ||
| void | ReleaseWaitingSlot
(
const FMassEntityHandle Entity, |
Releases previously acquired slot from a specified waiting lane. | |
| bool | SetLaneState
(
const FZoneGraphLaneHandle LaneHandle, |
Changes the state of a lane. | |
| void |
Overridden from UMassSubsystemBase
| Type | Name | Description | |
|---|---|---|---|
| void | Deinitialize () |
||
| void | Initialize
(
FSubsystemCollectionBase& Collection |
USubsystem BEGIN. | |
| void |