UMassEntitySubsystem::BatchCreateEntities

A version of CreateEntity that's creating a number of entities (Count) at one go

Choose your operating system:

Windows

macOS

Linux

References

Module

MassEntity

Header

/Engine/Plugins/Runtime/MassEntity/Source/MassEntity/Public/MassEntitySubsystem.h

Include

#include "MassEntitySubsystem.h"

Source

/Engine/Plugins/Runtime/MassEntity/Source/MassEntity/Private/MassEntitySubsystem.cpp

Syntax

TSharedRef< FEntityCreationContext > BatchCreateEntities
(
    const FArchetypeHandle Archetype,
    const int32 Count,
    TArray< FMassEntityHandle > & OutEntities
)

Remarks

A version of CreateEntity that's creating a number of entities (Count) at one go

Returns

a creation context that will notify all the interested observers about newly created fragments once the context is released

Parameters

Parameter

Description

Archetype

you want this entity to be

Count

number of entities to create

OutEntities

the newly created entities are appended to given array, i.e. the pre-existing content of OutEntities won't be affected by the call