注:文章的逻辑性差点是正常的,写文章的目的本就是为了帮助我自己学习,请谅解
1 AbilitySystemGlobals的类说明符
UCLASS(config = Game)

继承的UObject
2 FGameplayAbilityActorInfo的初始化
ASC的OnRegister里调用了这个来初始化AbilityActorInfo
/** Allocate an AbilityActorInfo. Note: this goes through a global function and is a SharedPtr so projects can make their own AbilityActorInfo */
if(!AbilityActorInfo.IsValid())
{
AbilityActorInfo = TSharedPtr<FGameplayAbilityActorInfo>(UAbilitySystemGlobals::Get().AllocAbilityActorInfo());
}
FGameplayAbilityActorInfo * UAbilitySystemGlobals::AllocAbilityActorInfo() const
{
return new FGameplayAbilityActorInfo();
}
3 FGameplayAbilityActorInfo的属性
每个属性的注释大致翻译一下就能懂:
/** The actor that owns the abilities, shouldn't be null */
UPROPERTY(BlueprintReadOnly, Category = "ActorInfo")
TWeakObjectPtr<AActor> OwnerActor;
//拥有能力的actor,不能为空
/** The physical representation of the owner, used for targeting and animation. This will often be null! */
UPROPERTY(BlueprintReadOnly, Category = "ActorInfo")
TWeakObjectPtr<AActor> AvatarActor;
//owner actor的物理表现的actor
/** PlayerController associated with the owning actor. T

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



