tranek / GASDocumentation

My understanding of Unreal Engine 5's GameplayAbilitySystem plugin with a simple multiplayer sample project.
MIT License
4.39k stars 806 forks source link

In UE5.1 preview: SMPAbilityTask_PlayMontageAndWaitForEvent.cpp(179): error C2678: binary '!': no operator found #89

Closed hamar02 closed 1 year ago

hamar02 commented 2 years ago

C:\Perforce...\Source....\SMPAbilityTask_PlayMontageAndWaitForEvent.cpp(179): error C2678: binary '!': no operator found which takes a left-hand operand of type 'TWeakObjectPtr<UAbilitySystemComponent,FWeakObjectPtr>' (or there is no acceptable conversion)

xSliver commented 2 years ago

You have to add ".IsValid()" where you access your AbilitySystemComponent. Looks like EPIC changed the type to 'TWeakObjectPtr' instead of a regular pointer (actually I dont have a clue since i'm a beginner, the following fixed it for me).

'if (AbilitySystemComponent.IsValid() && Ability)' instead of 'if (AbilitySystemComponent && Ability)'

tranek commented 2 years ago

I won't be able to check on it for a few weeks as I don't have access to a PC right now.

tranek commented 1 year ago

@xSliver Is correct. All instances of this are fixed now in the 5.1 and master branches.