GAS AttributeSet not loading on placed actors in UE5.0.3

Using tranek/GASDocumentation as a guide.

The problem I encountered was my placed and spawned enemies work just fine in the default level that loads when creating a new UE5.0.3 project. When I created a new basic level, all the sudden my placed enemies would not properly load their AttributeSet, but would load their AbilitySystemComponent. Spawned actors had both the AttributeSet and ASC working just fine.

The core of my issue is per Tranek’s guide above, I opted to not use the TWeakRef and instead just listed them as variables below:

class UAbilitySystemComponent* AbilitySystemComponent;
class UNDAttributeSetBase* AttributeSetBase;

For some reason this works just fine if your level template is based around Open World. But it does not work if you create a new Basic level.

The solution is to make sure each one has the UPROPERTY() tag above it:

UPROPERTY(BlueprintReadOnly, Category = “Character”)
class UAbilitySystemComponent* AbilitySystemComponent;
UPROPERTY(BlueprintReadOnly, Category = “Character”)
class UNDAttributeSetBase* AttributeSetBase;

Maybe the OpenWorld initializes in a way that Placed Actors are actually Spawned actors? I’m not sure but hopefully this saves someone a headache.

1 Like

Headache saved here. Thank you so much for the clear description & solution :smile:

1 Like