Navigation
API > API/Plugins > API/Plugins/MassSpawner
References
| Module | MassSpawner |
| Header | /Engine/Plugins/Runtime/MassGameplay/Source/MassSpawner/Public/MassEntityConfigAsset.h |
| Include | #include "MassEntityConfigAsset.h" |
Syntax
USTRUCT&40;&41;
struct FMassEntityConfig
Remarks
Describes a Mass agent to spawn. The struct can be embedded to allow last minute changes to the agent (i.e. for debugging). The agent config describes a unique list of features which are used to create an entity template. Derived configs can override parent features.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UObject > | ConfigOwner | ||
| TObjectPtr< const UMassEntityConfigAsset > | Parent | Reference to parent config asset | |
| TArray< TObjectPtr< UMassEntityTraitBase > > | Traits | Array of unique traits of this config |
Constructors
| Type | Name | Description | |
|---|---|---|---|
FMassEntityConfig
(
UObject& InOwner |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddTrait
(
UMassEntityTraitBase& Trait |
Adds Trait to the collection of traits hosted by this FMassEntityConfig instance | |
| void | DestroyEntityTemplate
(
const UWorld& World |
||
| const UMassEntityTraitBase * | FindTrait
(
TSubclassOf< UMassEntityTraitBase > TraitClass, |
Looks for a trait of the indicated type, accepting all child classes as well, unless bExactMatch == true | |
| void | GetCombinedTraits
(
TArray< UMassEntityTraitBase* >& OutTraits |
Combines traits based on the config hierarchy and returns list of unique traits | |
| const FMassEntityTemplate & | GetEntityTemplateChecked
(
const UWorld& World |
Fetches the EntityTemplate for given World, fails a check if one cannot be found. | |
| const FGuid & | GetGuid () |
||
| const FMassEntityTemplate & | GetOrCreateEntityTemplate
(
const UWorld& World |
Create entity template based on the features included in this config. | |
| const UMassEntityConfigAsset * | GetParent () |
||
| TConstArrayView< UMassEntityTraitBase * > | GetTraits () |
||
| bool | IsEmpty () |
||
| void | |||
| void | SetParentAsset
(
const UMassEntityConfigAsset& InParent |
||
| bool | ValidateEntityTemplate
(
const UWorld& World |
Validates if the entity template is well built |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | DestroyEntityTemplate
(
const UWorld& World, |
This flavor of DestroyEntityTemplate is deprecated. Use the one without the ConfigOwner parameter (now a property of the FMassEntityConfig itself) | |
| void | GetCombinedTraits
(
TArray< UMassEntityTraitBase* >& OutTraits, |
This flavor of GetCombinedTraits is deprecated. Use the one without the ConfigOwner parameter (now a property of the FMassEntityConfig itself) | |
| const FMassEntityTemplate & | GetEntityTemplateChecked
(
const UWorld& World, |
This flavor of GetEntityTemplateChecked is deprecated. Use the one without the ConfigOwner parameter (now a property of the FMassEntityConfig itself) | |
| const FMassEntityTemplate & | GetOrCreateEntityTemplate
(
const UWorld& World, |
This flavor of GetOrCreateEntityTemplate is deprecated. Use the one without the ConfigOwner parameter (now a property of the FMassEntityConfig itself) | |
| bool | ValidateEntityTemplate
(
const UWorld& World, |
This flavor of ValidateEntityTemplate is deprecated. Use the one without the ConfigOwner parameter (now a property of the FMassEntityConfig itself) |