Navigation
API > API/Plugins > API/Plugins/MetaHumanCharacterPalette > API/Plugins/MetaHumanCharacterPalette/UMetaHumanCharacterPalette
Description
Replace an existing item with a new item.
The new item is allowed to have a different item key.
The list of items is ordered, and the new item will be put at the same index as the existing item it replaces. In other words, the existing item will be overwritten in place by the new one.
If the new item's key conflicts with another item in the palette, this operation will fail. It's guaranteed to succeed if an item matching ExistingKey exists, and the new item's Variation is set from a call to GenerateUniqueVariationName.
| Name | TryReplaceItem |
| Type | function |
| Header File | /Engine/Plugins/MetaHuman/MetaHumanCharacter/Source/MetaHumanCharacterPalette/Public/MetaHumanCharacterPalette.h |
| Include Path | #include "MetaHumanCharacterPalette.h" |
| Source | /Engine/Plugins/MetaHuman/MetaHumanCharacter/Source/MetaHumanCharacterPalette/Private/MetaHumanCharacterPalette.cpp |
bool TryReplaceItem
(
const FMetaHumanPaletteItemKey & ExistingKey,
const FMetaHumanCharacterPaletteItem & NewItem
)