Leçon 1

Table des matières

Special Case SoundBanks

When loading a WAG build, you’ll first see a title screen. The title screen scene has the Region Music theme and the Woodlands ambience, along with various UI sounds. Currently, the All_In_One SoundBank is loaded in the scene, which includes all audio assets and information from the Wwise project. The title screen scene does not need all the game audio assets, so let’s make a new SoundBank and assign only the Events that are necessary to this scene.

  1. In the Project Explorer, select the SoundBanks tab.

    Within the SoundBanks tab, you’ll see a predefined Work Unit structure of SoundBanks. Throughout Lesson 1 and 6, these Work Units will be filled with SoundBanks constructed for different purposes. Let’s now add the TitleScreen SoundBank to the General Work Unit, as it covers a scene rather than context or region.

    [Note]

    Work Units are containers of information related to elements in Wwise. They are distinct XML files in your Wwise Project folder, and so by categorizing your project (Actor Mixers, Sound SFX and so on) using Work Units, you make it easier for multiple team members to work in the same project concurrently.

  2. Expand SoundBanks > Default Work Unit, right-click on General work unit and select New Child > SoundBank.

  3. Name the new SoundBank ‘TitleScreen’.

    Make sure to spell the name exactly as written above because the game will try to fetch the SoundBank by the specified name.

Now add the following assets to the TitleScreen SoundBank.

  1. From the Layouts menu bar, select SoundBank.

  2. In the SoundBank Manager, open the General Work Unit and select the TitleScreen SoundBank.

    Notice that nothing is assigned to the TitleScreen in the SoundBank Editor’s Add tab. Let’s now add Music, Ambience, and Generic Menu audio assets to the SoundBank.

  3. From the Project Explorer's Events tab, expand Events > Music > SoundBankSpecific and drag the Music_TitleScreen Event into the TitleScreen SoundBank.

  4. From the Project Explorer's Events tab, expand Ambient > SoundBankSpecific and drag the Ambient_Region_Woodlands Event into the TitleScreen SoundBank.

  5. From the Project Explorer's Events tab, expand UI and drag the entire Generic folder into the TitleScreen SoundBank.

    When classifying Events in your project, good practice is to use Work Units and folders. By storing Events as their children, you can simply drag the parent to a SoundBank instead of all the individual Events. This will simplify your SoundBank Editor view, and all Events you might add to those folders in the future will automatically be added to the associated SoundBanks.

  6. Under the SoundBank Manager’s General Work Unit, ensure the TitleScreen SoundBank is selected.

    [Note]

    You only have to generate the TitleScreen SoundBank, but should you choose to select anything in the TitleScreen menu and load another scene, you might consider generating all.

  7. Make sure your working platform (Windows or Mac) and English(US) is selected.

  8. Click Generate Checked.

    [Note]

    Make sure that the Wwise Unity Integration references the location of your generated SoundBanks, before proceeding. Find more information in the introduction, section ‘Wwise in Unity’.

  9. From the Unity menu, select Audiokinetic > Certification > 251 > Lesson 1 > Special Case SoundBanks.

  10. Click Play to enter play mode.

  11. Confirm audio is playing.

  12. Click Play to exit play mode.

You’re now only including the most essential audio assets, and so have reduced the runtime memory usage from 15,035 KB (the size of the All_In_One SoundBank) to 928 KB (the size of the TitleScreen SoundBank). In Lesson 6, you’ll learn how to split the SoundBanks into pieces and load them during runtime, but in general the process is the same: remove unused assets or distribute them to other SoundBanks.


Cette page a-t-elle été utile ?