c++unreal-engine4unreal-engine5

I get no sound in Game in UE 5


Same project ToonTanks had sound normally in UE4 but when I migrated to UE5 there is no projectile sound.

In projectile.h I declare a sound like this

UPROPERTY(EditAnywhere, Category="combat") 
USoundBase* LaunchSound;

and I set it in the blueprint then in projectile.cpp BeginPlay I play the sound like this

if (LaunchSound) { 
UGameplayStatics::PlaySoundAtLocation(this, LaunchSound, GetActorLocation());
}

Editor output sound normally when I press on the stop button also I tried FPS demo it has sound in game normally. I debugged this game and the execution go inside if but no sound. Any advise ?


Solution

  • Fixed using these steps:

    1-Delete the folder Intermediate
    2-Right click the uproject file and select generate vs files
    3-open rider and choose for ex development editor build
    4-wait until rider update source files
    5-build from rider 
    6-open UE5 editor and run and sound work as expected.