版本

menu_open
警告:系统已根据您所用大版本 (2023.1.8.8601) 自动跳转至最新文档。若想访问特定版本的文档,请从 Audiokinetic Launcher 下载离线文档,并在 Wwise 设计程序中勾选 Offline Documentation 选项。
Wwise Unreal Integration Documentation
快速入门

This guide provides explains how to quickly integrate Wwise into an Unreal project. It describes the essential steps required to set up a functional project. When you are finished, you can explore the rest of the Wwise Unreal Integration documentation for details on usage or on specific aspects of the Integration.

Creating an Integrated Project

First, create your Wwise and Unreal projects and integrate them through the Launcher:

  1. Create a Wwise project, as described in Creating a New Project in the Wwise Help.
  2. Create an Unreal C++ project, as described in Creating a New Project in the Unreal Engine 5 documentation.
  3. Integrate Wwise into your Unreal project through the Audiokinetic Launcher. See Integrating Wwise into an Unreal Project in the Audiokinetic Launcher documentation.
参见

Creating an Ambient Sound in Wwise

The easiest way to play a sound event in a level is to use an AkAmbient actor, which plays the sound according to rules, typically the instantiation of a level. Before you set up an ambient sound in Unreal, the integrated Wwise project must contain an appropriate sound as well as an Event to play the sound. Ensure that you have a supported audio file type (see What media files are supported?).

This procedure uses auto-defined SoundBanks, which we recommend instead of user-defined SoundBanks. For more information, see Understanding Auto-Defined and User-Defined SoundBanks.

To prepare an ambient sound in Wwise:

  1. Import an audio file as an SFX object, as described in Importing media files for SFX.
  2. Create an Event and add a Play action to it, as described in Creating Events.
  3. Enable auto-defined SoundBanks, as described in Auto-defined SoundBanks.
  4. Generate SoundBanks, as described in Generating SoundBanks for a project.

Configuring Unreal Project Settings

There are several Unreal Project Settings that you have to set in order to access the Wwise SoundBanks and use the Wwise Browser in Unreal, through which you can access Wwise objects. In addition, you must choose an Unreal audio routing option that routes audio through the Wwise sound engine.

To configure the required Unreal settings:

  1. In the Unreal Editor, click File > Project Settings.
  2. In the Wwise - Integration Settings section, set the Root Output Path to the same Root Output Path specified in the Wwise Project, which is typically the project's GeneratedSoundBanks folder. For more information on the Wwise setting, see SoundBanks Tab.
  3. Set the Unreal Audio Routing option to either Route through AudioLink or Enable Wwise SoundEngine only. For more information on audio routing options, see Combining Unreal 5 and Wwise Audio with AudioLink.
  4. Close the Project Settings window and then click Window > Wwise Browser.
  5. The objects from the Wwise project are displayed in the Wwise Browser:
    The Wwise Browser includes a Generate SoundBanks button in the upper-right corner, which is equivalent to Generate All in Wwise Authoring. You can click it to generate Wwise SoundBanks from the Unreal Editor. For more information about the Wwise Browser, see Managing Assets with the Wwise Browser.

Adding an Asset from the Wwise Browser

After you generate SoundBanks, the Event you created in Wwise appears in the Wwise Browser in the Events folder.

To add your Wwise Event to the Unreal level:

  • Do one of the following:
    • Drag the Event from the Wwise Browser into the Content Browser, and from there into the level.
    • Drag the Event from the Wwise Browser into the level. If you add the Event to the level directly, the corresponding Unreal Asset is created in the Default Asset Creation Path (see Integration Settings).

When you add a Wwise object to Unreal, a corresponding AkComponent is automatically created. The AkComponent acts as a proxy for the Wwise game object. For more information, see AkComponent.

通过 Level Blueprint 播放

In Unreal, the Wwise Event you added appears in the level as an AkAmbientSound. To ensure that the sound plays throughout the level, you must update the level Blueprint. For more information about Blueprints, see Blueprints Visual Scripting.

To play the ambient sound from the level Blueprint:

  1. Open the level Blueprint.
  2. Add and connect an Event BeginPlay node and a Post Event node.
  3. Drag the AkAmbientSound Actor from the Outliner into the Blueprint, and connect it to the Post Event node. The following image shows the desired configuration:

播放声音

Depending on the type of Unreal project you are using, the project might already contain sounds. To confirm that you successfully added the ambient sound, remove all other sounds from the level.

In the Editor, click Play. The Event is posted and you can hear your sound playing.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅