Steam Audio reflections not working in standalone

I had the same issue and found a solution.

The reason is that SteamAudio plugin doesn’t process reflections if there are no Play-in-Editor instances found. When playing in standalone or packaged build, it can’t detect those instances, therefore just shuts down.

You can modify the source code of the plugin. File is SteamAudioModule.cpp in SteamAudio module. Tested in UE 5.5.4 and SteamAudio 4.6.1.

Find function:

bool FSteamAudioModule::IsPlaying()
{
    FScopeLock Lock(&PIEInitCountMutex);
    return PIEInitCount > 0;
}

there’s a comment in .h file that goes:

Returns true if we're currently playing (i.e., in a standalone game or in play-in-editor mode.

But actually that function returns ‘true’ only when playing in editor.
Add some conditions. The result is:

bool FSteamAudioModule::IsPlaying()
{
    FScopeLock Lock(&PIEInitCountMutex);
    return GEngine->IsInitialized()
    && GEngine->GetMainAudioDevice().IsValid()
    && (IsRunningGame() || PIEInitCount > 0);
}

IsRunningGame() returns ‘true’ in standalone process and ‘false’ in editor.
GEngine conditions are added in order to prevent crashes (IsPlaying() function gets called even before engine is initialized).

Don’t forget to add the following, if you want to package the plugin:

#include "Engine/Engine.h"

Build solution from your IDE. Now reflections should work as expected.

1 Like