UAbilitySystemComponent::RefreshAbilityActorInfo
#include "AbilitySystemComponent.h"
Access: public
Description
Re-queries the avatar actor's movement component, mesh, anim instance, and player controller, updating the cached AbilityActorInfo without changing the owner or avatar actor references themselves.
Caveats & Gotchas
- • Call this after late-spawned components are added to the avatar (e.g., a dynamically attached movement component), because InitAbilityActorInfo captures them at init time and won't see new additions automatically.
- • This does NOT update the OwnerActor or AvatarActor pointers — it only refreshes derived fields like MovementComponent and AnimInstance. To change actors entirely, use SetAvatarActor or InitAbilityActorInfo.
- • Safe to call at runtime, but avoid calling every frame — it iterates over the avatar's components internally. Call it in response to discrete events (possession, component add/remove).
Signature
UE_API void RefreshAbilityActorInfo(); Return Type
void Example
Refresh after components are ready C++
void AMyCharacter::PostInitializeComponents()
{
Super::PostInitializeComponents();
// Components are all registered now — refresh so ASC picks them up
if (UAbilitySystemComponent* ASC = GetAbilitySystemComponent())
{
ASC->RefreshAbilityActorInfo();
}
} See Also
Version History
Introduced in: 4.15
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?