버전

menu_open

Using OBB Files (Android)

Overview of the OBB and Wwise IO

For the Android platform, when checking the Unity option Player Settings > Publishing Settings > Split Application Binary, APK Expansion Files are used for bundling the project assets. This effectively creates a zip file with the .obb extension that contains the StreamingAssets folder, including the SoundBanks. The default Android SoundBank loading support assumes that SoundBanks are located in either the APK file or OBB file.

If you are constructing your own OBB file externally, note that the inner path given to AkSoundEngine.SetBasePath must be the same in the OBB. OBB files must be uncompressed and unencrypted for the default I/O system to work. If this is not the case, then you will need to uncompress the OBB in the persistent data path. The CPU cost to uncompress is too high to uncompress on the fly.

Loading banks in memory

Alternatively, you can use in-memory loading of banks. An example is provided in AkMemBankLoader.cs. This script tries to load the specified SoundBank at the start time of the scene, and unload it when the scene is destroyed. The following changes need to be made to use this example:

  1. Add the script as a component to any game object that needs to load a SoundBank.
  2. In the Inspector, enter the file name of the SoundBank into the Bank Name field of the script component.
  3. In the Inspector, select the Is Localized Bank option if the SoundBank is localized. It will use the global language defined in AkInitializer.cs.
  4. Disable any other SoundBank-loading methods and save the scene.

Two methods AkMemBankLoader.LoadNonLocalizedBank() and AkMemBankLoader. LoadLocalizedBank() can also be called directly in code for the non-localized and localized SoundBanks.

Limitations

  • The in-memory method cannot load the streamed SoundBanks. As a better but more difficult alternative, low-level IO hooks can be implemented to decompress the zip file on the fly to support both streamed and non-streamed SoundBanks. This example, however, will be left for future work. Users are free to implement such hooks and rebuild the Integration. Refer to the section streamingmanager_lowlevel to do so.
  • For simplicity, the example script loads only one SoundBank per script component, but one can easily extend it to a collection-based version that can batch-load a list of SoundBanks.
  • The example only wraps the simplest in-memory SoundBank-loading API; there is another callback-based version which you can easily add when you need. The API binding is already available in the Integration.
Generated on Thu Jul 19 10:35:20 2018 for Wwise Unity Integration by  doxygen 1.6.3

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요