Navigation
API > API/Plugins > API/Plugins/MassSpawner > API/Plugins/MassSpawner/UMassEntityTraitBase
Description
Called once all traits have been processed and fragment requirements have been checked. Override this function to perform additional Trait's configuration validation. Returning `false_ will indicate that the trait instance is not happy with the validation results - this result will be treated as an error.
| Name | ValidateTemplate |
| Type | function |
| Header File | /Engine/Plugins/Runtime/MassGameplay/Source/MassSpawner/Public/MassEntityTraitBase.h |
| Include Path | #include "MassEntityTraitBase.h" |
| Source | /Engine/Plugins/Runtime/MassGameplay/Source/MassSpawner/Private/MassEntityTraitBase.cpp |
virtual bool ValidateTemplate
(
const FMassEntityTemplateBuildContext & BuildContext,
const UWorld & World,
FAdditionalTraitRequirements & OutTraitRequirements
) const
whether the validation was successful
Parameters
| Name | Remarks |
|---|---|
| OutTraitRequirements | contains requirements declared by this trait and gives ValidateTemplate a chance to add to the dependencies based on the state of BuildContext, which by this point should contain all the elements added by all the relevant traits. |