Navigation
API > API/Runtime > API/Runtime/MassEntity > API/Runtime/MassEntity/FEntityBuilder
Description
Adds a fragment of type T to the entity and returns a reference to it, constructing it with the provided arguments. If a fragment of the given type already exists then it will be overriden and its reference returned.
| Name | GetOrCreate |
| Type | function |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityBuilder.h |
| Include Path | #include "MassEntityBuilder.h" |
template<typename T, typename... TArgs>
T & GetOrCreate
(
TArgs &&... InArgs
)
A reference to the added fragment.