Build the Native Integration Plug-in from Source
The Wwise-Unity integration is a thin layer of C# calling the native Wwise API. 全プラットフォーム用にビルドされた状態で提供されます。多くの場合、Integrationプラグインの再ビルドは不要です。ただしソースコードがある場合はカスタム化して、ネーティブサウンドエンジンにカスタム変更を実装させたり、サウンドエンジンとのインターフェースとなるC++コードを修正したりすることもできます。これは、C++の知識がある程度あるプログラマが行うべき作業です。
The procedure
- Install the Wwise SDK for the platforms you wish to build using the Wwise Launcher. 必ずログオフして、再びログオンすること。
- WwiseインテグレーションをUnityプロジェクトに追加すると、使用するOS(WindowsまたはMac)のソース(source)zipがLauncherによってUnityプロジェクトにインストールされるので、そのソースzipの場所を見つける(zipの名前の最後に_Src.zipと付く)。
- ビルドする対象プラットフォームがWindowsやMac以外の場合は、そのソースzipの場所を見つける。
- このIntegrationをビルドするための前提条件を確認する。詳細は 前提条件 を参照。
- 全てのソースzipを、同じフォルダに解凍する。詳細はUnityプロジェクトのインテグレーションの、インストールとアップグレード を参照。
- ビルドプロセスを、次の2種類のメソッドのいずれかで起動する: Build using console utility または Integrated Development Environment (IDE)を使ってビルドする.
- ビルドが終了するまで待つ。ビルドが成功すれと、
Deployment
フォルダの下のプラグインやAPIバインディングが更新されるか、今までなければ新しく作成される。
Notes
- During the build, you can monitor warnings, errors, or critical messages, if any, by reading the detailed log messages found in the Build Log.
Integrationを自分でビルドするための要件:
プラットフォーム | 必要なコンポーネント |
All platforms |
|
Android |
|
iOS |
|
Linux |
|
Mac |
|
PS4 | Visual Studio 2012 Professional Edition. |
Windows | Visual Studio 2013 Professional Edition. |
Windows Store | Visual Studio 2015. |
Xbox One | Visual Studio 2012 Professional Edition. |
How to install the source package
Unzip the source package. これによって、ソースパッケージと求めているプラットフォームのWwise SDKインストールだけを使って、Integrationパッケージのコンテンツを再ビルドして生成できます。あるいは、圧縮されていないWwiseフォルダ内のコンテンツと、UnityプロジェクトのAssetsフォルダにあるインポート済みIntegrationユニティパッケージをマージする方法もあります。ただし不必要な中間ファイルがAssetsフォルダに生成されてしまうことがあり、これはマニュアル操作で排除しなければなりません。
インストールしたインテグレーションパッケージのフォルダ構成
- StreamingAssets: SoundBankの自動デプロイに使うDeploying SoundBanks in single-platform projects のフォルダ。
- Wwise: 最上位フォルダ。
- Deployment: アプリケーションで使うメインのIntegrationファイル。
- API: C++ から C# へのバインディングファイル。これがネーティブWwise SDKの変換である。
- Dependencies: サードパーティのUnityスクリプトで、一部プラットフォームで必要となる。
- Components: 直接使えるUnityコンポーネントスクリプトで、カスタム設定コンポーネントの例として活用できる。
- Plug-ins: 様々なコンフィギュレーションやデバグシンボルデータベースのUnityプラグインライブラリ。
- Platform
- Architecture: Files shared by architectures of a multi-architecture platform.
- Debug: プラグインバイナリの
Debug
バージョン。Wwise plug-in deployment for detail を参照してください。 - Profile: プラグインバイナリの
Profile
バージョン。Wwise plug-in deployment for detail を参照してください。 - Release: プラグインバイナリの
Release
バージョン。Wwise plug-in deployment for detail を参照してください。 - DSP: Wwiseプラグインエフェクト。
- Debug: プラグインバイナリの
- Architecture: Files shared by architectures of a multi-architecture platform.
- Platform
- Documentation: Integrationに関する完全なドキュメント。
- Editor: WwiseUnityIntegrationで使われるEditor WindowとInspectorの全て。
- Tools: 追加機能を提供するアプリケーションツール。
- Deployment: アプリケーションで使うメインのIntegrationファイル。
インストールしたソースパッケージのフォルダ構成
- Wwise: 最上位フォルダ。
- AkSoundEngine: Integrationをビルドするのに必要なソースコードとIDCプロジェクトを、プラットフォーム別に整理したもの。
- Common: 全ての対応済みプラットフォームで使われるソースコードやビルドスクリプト。
- Platform: 対象プラットフォームのIDEソリューションまたはプロジェクト、ソースコード、そしてそのプラットフォーム専用のビルドスクリプト。
- Integration/Assets/Wwise/Deployment: アプリケーションで使うメインのIntegrationファイル。
- API: APIバインディングのルートレベルのフォルダ。
- Generated: SWIGバインディングの段階で生成されるAPIバインディングファイル。
- Handwritten: 手書きのAPIバインディングファイル。
- Components: 直接使えるファクトリ版Unityコンポーネントスクリプトで、カスタム設定コンポーネントの例として活用できる。
- Plugins: 全てのWwiseプラグイン(AkSoundEngineビルド後に書かれたもの)。
- <platform>: 該当するプラットフォームフォルダ。
- <architecture>: アプリケーションプラットフォームのアーキテクチャ。
- <platform>: 該当するプラットフォームフォルダ。
- API: APIバインディングのルートレベルのフォルダ。
- AkSoundEngine: Integrationをビルドするのに必要なソースコードとIDCプロジェクトを、プラットフォーム別に整理したもの。
Build using console utility
You can build the Integration from the command line using the build script located at Wwise\AkSoundEngine\Common\BuildWwiseUnityIntegration.py
. これは連続するインテグレーションに便利です。To see the usage and examples, assuming your current working directory is the parent folder of the script, type in a command console on your computer:
python BuildWwiseUnityIntegration.py -h
Integrated Development Environment (IDE)を使ってビルドする
Located in the Wwise Unity Integration source package under:
WwiseUnityIntegration_version_platform_Src.zip\Wwise\AkSoundEngine\YourPlatform
the solution (or Xcode project) allows you to build the Integration for the target platform in a supported IDE.
Building for the Mac or iOS platform with Xcode
When building the integration from the command line, the WWISESDK
path is provided to Xcode automatically based on the one set in the environment variable $WWISESDK
or the one provided to the build script using the -w
option. ただしXcode IDEを使う場合は、WWISESDKパスをマニュアル設定する必要があります。これをするにはXcodeプロジェクトをMacまたはiOSのプラットフォーム用に開き、プロジェクトナビゲータで AkSoundEngine{platform} プロジェクトを選択します。Build Settingsページを選択する。ページの最後のUser-Definedセクションに WWISESDK
設定キーがあります。WWISESDK
のパスを設定値として入力して、(ex: /Users/myUser/Wwise/SDK )に対するインテグレーションをビルドします。
Building for the Linux platform
A premake script is included in the integration source package that generated the necessary makefiles. To build the Linux plug-in from source, simply enter the following commands into a terminal:
cd <Integration source location>/AkSoundEngine/Common
./premake4 --akplatform=Linux gmake
make -f AkSoundEngineLinux.make config=<config>
<config>が、debug32
, profile32
, release32
, debug64
, profile64
, またはrelease64
です。その結果のプラグインは<Integration source location>/Deployment/Plugins/Linux
にあります。
Deploy the new lib
The resulting binaries will be found in Wwise\Deployment\Plugins\[Platform]. Assets\Wwiseディレクトリのソースが解凍してなければ、そのフォルダの新バイナリをコピーして、プロジェクトのAssetsディレクトリにある該当フォルダに入れます。
Under the hood
インテグレーションコードをビルドするためのソースをパッケージングする前に、SWIGを使ってWwise SDK用のAPIバインディングをUnity内で生成します。多くのユーザは、WwiseでUnityを使う上でSWIGは必要ありません。上級ユーザが、インテグレーションコードをビルドするために、変換されたAPIを含むWwise for Unityソースにアクセスする場合でも、SWIGをインストールしたり使用したりする必要ありません。唯一の例外が、サウンドエンジンを変更する場合や、サウンドエンジンとのインターフェースとなるC++コードを修正したりする場合です。このような稀なケースでは、サポート担当に連絡してから進めることを推奨します。
The build process performs the following task:
- The Wwise SDK libraries are wrapped into a single library as the Unity plug-in, a dynamic library (.dll) on Windows, a loadable bundle (.bundle) on Mac OS X, a static library (.a) on iOS, or a shared library (.so) on Android. Deploymentフォルダに直接ビルドされます。フォルダ構造は、Unityプロジェクトのインテグレーションの、インストールとアップグレード を参照してください。
Wwise Unity Integrationに対してMon Jan 8 10:46:17 2018に生成されました。
