PlaySoundAttached does not accept a USoundCue

Hello, I’m using the engine’s version 4.7 and I’m trying to use the UGameplayStatics::PlaySoundAttached function like it is on the ShooterGame’s code version 4.6, but with no success.

I see that PlaySoundAttached receives a USoundBase as a first parameter, but when I pass a SoundCue it returns me an error saying that USoundCue is incompatible with the parameter of type USoundBase**.

Am I missing something?

You’re probably missing an include for SoundCue.h so that it knows that it inherits from USoundBase.

It worked, thank you!

oh man, I’ve been looking for an answer to this for hours. I honestly didn’t knew it needed the include to know what in inherited from!