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. The function will assert if an element of type T already exists.
| Name | Add_GetRef |
| Type | function |
| Header File | /Engine/Source/Runtime/MassEntity/Public/MassEntityBuilder.h |
| Include Path | #include "MassEntityBuilder.h" |
template<typename T, typename... TArgs>
T & Add_GetRef
(
TArgs &&... InArgs
)
A reference to the added fragment.
Parameters
| Name | Remarks |
|---|---|
| T | The type of fragment to add. |
| InArgs | Constructor arguments for initializing the fragment. |