UAttributeSet::GetOwningAbilitySystemComponentChecked
#include "AttributeSet.h"
Access: public
Specifiers: const
Description
Returns the ability system component that owns this attribute set, asserting if it isn't registered with one.
Caveats & Gotchas
- • Crashes (via check()) in the owning ASC isn't resolved, unlike GetOwningAbilitySystemComponent which returns nullptr — only use this where the owner is guaranteed to exist.
- • Used internally by macros like GAMEPLAYATTRIBUTE_REPNOTIFY, which assume the attribute set is always attached to a live ASC by the time replication callbacks fire.
Signature
UAbilitySystemComponent* GetOwningAbilitySystemComponentChecked() const Return Type
UAbilitySystemComponent* Example
Use in a RepNotify where the ASC is guaranteed to exist C++
void UMyHealthSet::OnRep_Health(const FGameplayAttributeData& OldValue)
{
GAMEPLAYATTRIBUTE_REPNOTIFY(UMyHealthSet, Health, OldValue);
} Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?