Navigation
API > API/Runtime > API/Runtime/Chaos > API/Runtime/Chaos/THashMappedArray
Description
Add an element with the specified ID to the map. Returns a reference to the newly inserted element. It is an error to insert an item twice, but this is only detected in debug builds. Use TryEmplace if you do not know whether the items already exists in the map. NOTE: since your element type will also need to contain the ID, you usually have to pass the ID twice to emplace, which is a little annoying, but shouldn't affect much.
| Name | Emplace |
| Type | function |
| Header File | /Engine/Source/Runtime/Experimental/Chaos/Public/Chaos/Framework/HashMappedArray.h |
| Include Path | #include "Chaos/Framework/HashMappedArray.h" |
template<typename... ArgsType>
FElementType & Emplace
(
const FIDType ID,
ArgsType &&... Args
)