Table of Contents

Wwise Unreal Integration Documentation
UE4 C++ projects

Linking with the AkAudio Module

The AkAudio module must be linked with to use Wwise's functionality within a C++ project. This must be done within your project's module file (.build.cs).

For example:

public class MyModule : ModuleRules
{
public MyModule(ReadOnlyTargetRules Target) : base(Target)
{
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AkAudio" });
// Other settings
}
}
Note:
All AK::SoundEngine calls are currently made from AkAudioDevice and must be made from within the AkAudio module. Users must extend the functionality within the AkAudio module to expose required Wwise functionality.

Creating AkComponent from C++

When creating a new AkComponent from C++, it is necessary to attach it to a parent component. This is necessary, because the FAkAudioDevice::GetAkComponent() helper method needs a parent component to retrieve the associated AkComponent.

auto* AkAudioComponent = CreateDefaultSubobject<UAkComponent>(TEXT("CppCreatedAKComponent"));
AkAudioComponent->SetupAttachment(RootSceneComponent);