When adding a new key-value pair to a TMap with a key that matches an existing pair, the new pair will replace the old one. The difference between these two is that TMap keys are unique, while TMultiMap supports storing multiple, identical keys. There are two types of map: TMap and TMultiMap. However, unlike TSet, this container stores data as key-value pairs ( TPair), using keys only for storage and retrieval. TMap is similar to TSet in that its structure is based on hashing keys. After TArray, the most commonly used container in Unreal Engine is TMap.
0 Comments
Leave a Reply. |