UAnimInstance::GetSyncGroupMapRead
#include "Animation/AnimInstance.h"
Access: public
Specifiers: ENGINE_API
Description
Returns a read-only reference to the current sync group map, which contains per-group state for all active sync groups. Each entry maps a sync group name to its FAnimGroupInstance, holding leader/follower relationships and marker positions.
Caveats & Gotchas
- • The returned reference is to internal animation state that can change every tick. Reading this outside of the animation update (e.g., from a gameplay timer) may observe partially updated data or data from a previous frame.
- • Sync group state is only populated for asset players that are actively contributing to evaluation. Inactive or zero-weight players do not appear in their group, even if they are technically assigned to one.
Signature
ENGINE_API const TMap<FName, FAnimGroupInstance>& GetSyncGroupMapRead() const; Return Type
const TMap<FName, FAnimGroupInstance>& Example
Iterate sync groups for debug logging C++
void UMyAnimInstance::DebugLogSyncGroups()
{
const TMap<FName, FAnimGroupInstance>& SyncGroups = GetSyncGroupMapRead();
for (const auto& Pair : SyncGroups)
{
UE_LOG(LogAnimation, Log, TEXT("Sync group '%s': %d active players"),
*Pair.Key.ToString(), Pair.Value.ActivePlayers.Num());
}
} Tags
Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?