Welcome to TiddlyWiki created by Jeremy Ruston; Copyright © 2004-2007 Jeremy Ruston, Copyright © 2007-2011 UnaMesa Association
The following features and functions of the native Wwise SDK are not supported or their behaviours are modified in the Integration (most recent change first):
*''UnloadBank()'' no longer takes a single argument overloaded version. A memory-location pointer has to be provided as the second argument.
*An iOS-specific API is added to handle audio interruptions: ''AK::SoundEngine::iOS::ListenToAudioSessionInterruption()''.
*Windows version of ''GetGameObjectFromPlayingID()'' returns GameObject ID in 32bit for both Windows 32bit and 64bit (truncation).
*''PostEvent()'' and GameObject-related APIs now accepts ''null'' as GameObject input argument to affect the global scope.
*''PostEvent()'' callbacks are serialized and occur on the start of the next game frame instead of being called from the audio thread. Therefore no synchronization mechanism is necessary.
*''AK::Monitoring::SetLocalOutput()'' was replaced by ''AkCallbackManager.SetMonitoringCallback()''.
*''AK::SoundEngine::SetPosition()'' was replaced by ''AkSoundEngine.SetObjectPosition()''.
*External Sources arrays in ''PostEvent()'' are limited to one source.
*Streaming sounds should not be done at the same time as level data is loaded from disk.
*In the Unity scripting language that doesn't support optional arguments, e.g. C#, an original API function that accept optional arguments is replaced by several versions of API functions that use fixed number of arguments, each adding an optional argument as a fixed argument.
*Several ''AK::SoundEngine::DynamicSequence'' API functions are renamed in their Unity API binding to maintain clarity. This is a remedy to compensate for the namespace-flattening side effects caused by SWIG. For instance, ''AK::SoundEngine::DynamicSequence::Open()'' would have become ''AkSoundEngine.Open()'' in the generated API. So we rename it into ''AkSoundEngine.DynamicSequenceOpen()'' in the API binding.
*C++ overloaded operators are renamed into functions in the Unity scripting language, e.g., ''AkArray::operator[]'' becomes ''AkPlaylistArray.ItemAtIndex(uint uiIndex)''. This is done according to how SWIG is designed to handle C++ overloaded operators.
*Unsupported API and components:
**iOS audio input callback API
**''AkSpeakerVolumeMatrixCallbackInfo''
**''AkSpeakerVolumeMatrixBusCallbackInfo''
**''AkBusCallbackFunc''
**''AK::SoundEngine::RegisterBusVolumeCallback''
**''AK::SoundEngine::Query::AkGameObjectsList''
**''AK::SoundEngine::Query::GetActiveGameObjects()''
**''AK::SoundEngine::Query::GameObjDst''
**''AK::SoundEngine::Query::AkRadiusList''
**''AK::SoundEngine::Query::GetMaxRadius(AkRadiusList & io_RadiusList)''
**''AK::SoundEngine::DynamicSequence::ResolveDialogueEvent(const char*, const char**, AkUint32, AkPlayingID)''
**''AK::SoundEngine::DynamicSequence::ResolveDialogueEvent(const wchar_t*, const wchar_t**, AkUint32, AkPlayingID)''
Also see [[Platform-specific Information]].
This script is an example of locating SoundBank paths. It shows how to ensure SoundBank access platform transparency by handling the platform-specific path details and constructing the full path to the platform-specific [[SoundBanks]] folder.
This script is the base class for environments (a.k.a. reverbs). It simply defines ''GetEnvValueForPosition()''. This class should be derived for various environment shapes. An example of this is ''AkBoxEnvironment.cs'' which can be tied to a Box Collider and represent a rectangular shaped environment. The ''AkEnvironment'' component works with ''AkEnvironmentAware.cs'' that needs to be tied with the sound emitter affected by the environment.
This script is needed to link Unity game objects to Wwise game objects. This script automatically registers a Wwise game object when needed and unregisters it when released. Therefore, you should never need to call ''AkSoundEngine.RegisterGameObj()'' or ''UnregisterGameObj()'' except in rare scenarios. If the script exists in your Assets folder, you don't have to manually attach it to any game objects in your scenes. ''AkSoundEngine'' class makes sure that the linking is done transparently. Note:
*If [[AkGameObjectTracker.cs]] is manually attached to the target game object, then [[AkGameObject.cs]] will not be attached automatically.
*If any sound engine API that involves game object is executed during functions Start() or Awake() of a Unity MonoBehaviour class, the AkGameObject.cs component will be visible in the game object's Editor Inspector pane.
*If the above API is executed during the main loop, the component will not be seen in the Inspector, but the Wwise game object registration is still automatically performed under the hood.
This script is necessary for all objects that can move, as it will set the position of the object at each frame. You will need to add it manually to all Unity game objects that can move. It will replace the basic ''AkGameObject''. The main reason why this functionality isn’t on all game objects is performance, tracking everything would be useless.
This script contains the initialization and game loop code. This script is marked as ''DontDestroyOnLoad'' so it stays active for the life of the game, not only one scene. You can, and probably should, modify this script to change the initialization parameters for the sound engine. A few are already exposed in the property inspector. Please refer to the Wwise SDK doc on ''AK::SoundEngine::Init()'' for more information on initialization.
This script contains the termination code of the sound engine, also marked as ''DontDestroyOnLoad''. Please refer to the Wwise SDK doc on ''AK::SoundEngine::Term()'' for more information on initialization.
This script shows an example of loading SoundBanks without using the Wwise Low-level IO framework. It is best used for the Android platform when the APK expansion file (OBB) is adopted for deploying assets. To use this script:
#Attach this script onto any game object that is a sound object.
#Edit the Bank Name field in the Inspector.
#Check if it operates on a localized SoundBank.
#Add the preprocessor ''AK_LOAD_BANK_IN_MEMORY'' in ''PlayerSettings | Other Settings | Scripting Define Symbols'' (Press Enter key when done)
#Save the scene.
See also [[How-to: Load SoundBanks from an APK expansion file (OBB)]].
This script updates the listener position in the sound engine at each game frame. Attach it to the game object that represents the listener.
This script is a helper class that log messages. See [[AkGlobalSoundEngineInitializer.cs]] for examples.
/*{{{*/
uint bankID;
AkSoundEngine.LoadBank(
"YourBank.bnk",
AkSoundEngine.AK_DEFAULT_POOL_ID,
out bankID);
// "gameObject" is assumed to be a Unity Game Object.
AkSoundEngine.PostEvent("YourPlayEvent", gameObject);
/*}}}*/
''BuildAndroidPluginMac.sh''
''BuildAndroidPluginWin.cmd''
Located at
{{{
UNITY_PROJECT_ROOT/Assets/Wwise/Logs/BuildWwiseUnityIntegration.log
}}}
the file contains the detailed messages while building the Integration; only the warning and error messages will be shown in the Unity Editor console and log.
The log messages are in the following format
{{{
Time : Message type: Source Code Filename (Module name): Line number: Message body
}}}
Example:
{{{
2013-09-26 09:29:56,490: INFO: BuildWwiseUnityIntegration.py (WindowsBuilder): 91: Building: Windows (Win32, Debug) ...
}}}
The log file accumulates and rotates to a new file after an hour. You can modify the rotation behaviour by configure the ''BuildUtil.CreateLogger()'' function in
{{{
UNITY_PROJECT_ROOT/Assets/AkSoundEngine/Common/BuildUtil.py
}}}
Refer to [[Python logging.handlers module|http://docs.python.org/2/library/logging.handlers.html]]
On certain platforms, additional log files may be generated by the IDEs, e.g., Visual Studio. They are available under the same folder with the keyword //IDE// in their filenames.
Located at
{{{
UNITY_PROJECT_ROOT/Assets/Wwise/AkSoundEngine/Common/BuildWwiseUnityIntegration.json
}}}
this [[JSON|http://en.wikipedia.org/wiki/JSON]] file stores user preferences related to customizing and building the Integration. It is created when the user builds the Integration for the first time and needs to be manually edited afterwards if necessary.
Note that the Windows paths specified in this file use double backward slashes
{{{
\\
}}}
as the path separator.
Located at ''UNITY_PROJECT_ROOT/Assets/Wwise/AkSoundEngine/Common/BuildWwiseUnityIntegration.py'', it is a console utility for building the Unity Integration from the source code. It is also the back-end script called by the Unity Editor script when building through the menu.
The Integration comes with our customized [[SWIG]].
On Windows, there is no extra step needed to install SWIG. On Mac OS X, you need to install SWIG by the following steps:
#Make sure you have installed [[pcre (Perl-Compatible Regular Expression)|http://www.pcre.org/]] first in order to successfully compile SWIG.
#Open a terminal window.
#Make your working directory the folder: ''SWIG''.
#Type ''./configure''.
#Type ''make''.
#Type ''sudo make install'' and input your administrator password upon prompt.
#Make sure the folder contains the executable ''swig'' is in the PATH variable of Xcode. The default location is ''/usr/local/bin''.
If you need any support, please post question to our [[Q&A forum|https://www.audiokinetic.com/qa/]] or contact our [[customer support|http://www.audiokinetic.com/en/support]].
[[Introduction]]
[[MainMenu]]
The Unity plugins for different platforms have to be placed under specific folders to be loaded by Unity. See below for the folder locations for our supported platforms.
| !Platform | !Plugin folder |h
| Android |UNITY_PROJECT_ROOT/Assets/Plugins/Android |
| iOS |~UNITY_PROJECT_ROOT/Assets/Plugins/iOS |
| Mac |~UNITY_PROJECT_ROOT/Assets/Plugins |
| Metro |~UNITY_PROJECT_ROOT/Assets/Plugins/Metro |
| PS3 |~UNITY_PROJECT_ROOT/Assets/Plugins/PS3 |
| Windows |~UNITY_PROJECT_ROOT/Assets/Plugins |
| Xbox360 |~UNITY_PROJECT_ROOT/Assets/Plugins |
config.options.chkDisableWikiLinks=false;
config.options.chkAllowLinksFromShadowTiddlers=false;
config.options.chkDisableNonExistingWikiLinks=true;
config.options.txtDisableWikiLinksList="DisableWikiLinksList";
config.options.txtDisableWikiLinksTag="excludeWikiWords";
/***
|Name|DisableWikiLinksPlugin|
|Source|http://www.TiddlyTools.com/#DisableWikiLinksPlugin|
|Version|1.6.0|
|Author|Eric Shulman|
|License|http://www.TiddlyTools.com/#LegalStatements|
|~CoreVersion|2.1|
|Type|plugin|
|Description|selectively disable TiddlyWiki's automatic ~WikiWord linking behavior|
This plugin allows you to disable TiddlyWiki's automatic ~WikiWord linking behavior, so that WikiWords embedded in tiddler content will be rendered as regular text, instead of being automatically converted to tiddler links. To create a tiddler link when automatic linking is disabled, you must enclose the link text within {{{[[...]]}}}.
!!!!!Usage
<<<
You can block automatic WikiWord linking behavior for any specific tiddler by ''tagging it with<<tag excludeWikiWords>>'' (see configuration below) or, check a plugin option to disable automatic WikiWord links to non-existing tiddler titles, while still linking WikiWords that correspond to existing tiddlers titles or shadow tiddler titles. You can also block specific selected WikiWords from being automatically linked by listing them in [[DisableWikiLinksList]] (see configuration below), separated by whitespace. This tiddler is optional and, when present, causes the listed words to always be excluded, even if automatic linking of other WikiWords is being permitted.
Note: WikiWords contained in default ''shadow'' tiddlers will be automatically linked unless you select an additional checkbox option lets you disable these automatic links as well, though this is not recommended, since it can make it more difficult to access some TiddlyWiki standard default content (such as AdvancedOptions or SideBarTabs)
<<<
!!!!!Configuration
<<<
<<option chkDisableWikiLinks>> Disable ALL automatic WikiWord tiddler links
<<option chkAllowLinksFromShadowTiddlers>> ... except for WikiWords //contained in// shadow tiddlers
<<option chkDisableNonExistingWikiLinks>> Disable automatic WikiWord links for non-existing tiddlers
Disable automatic WikiWord links for words listed in: <<option txtDisableWikiLinksList>>
Disable automatic WikiWord links for tiddlers tagged with: <<option txtDisableWikiLinksTag>>
<<<
!!!!!Revisions
<<<
2008.07.22 [1.6.0] hijack tiddler changed() method to filter disabled wiki words from internal links[] array (so they won't appear in the missing tiddlers list)
2007.06.09 [1.5.0] added configurable txtDisableWikiLinksTag (default value: "excludeWikiWords") to allows selective disabling of automatic WikiWord links for any tiddler tagged with that value.
2006.12.31 [1.4.0] in formatter, test for chkDisableNonExistingWikiLinks
2006.12.09 [1.3.0] in formatter, test for excluded wiki words specified in DisableWikiLinksList
2006.12.09 [1.2.2] fix logic in autoLinkWikiWords() (was allowing links TO shadow tiddlers, even when chkDisableWikiLinks is TRUE).
2006.12.09 [1.2.1] revised logic for handling links in shadow content
2006.12.08 [1.2.0] added hijack of Tiddler.prototype.autoLinkWikiWords so regular (non-bracketed) WikiWords won't be added to the missing list
2006.05.24 [1.1.0] added option to NOT bypass automatic wikiword links when displaying default shadow content (default is to auto-link shadow content)
2006.02.05 [1.0.1] wrapped wikifier hijack in init function to eliminate globals and avoid FireFox 1.5.0.1 crash bug when referencing globals
2005.12.09 [1.0.0] initial release
<<<
!!!!!Code
***/
//{{{
version.extensions.DisableWikiLinksPlugin= {major: 1, minor: 6, revision: 0, date: new Date(2008,7,22)};
if (config.options.chkDisableNonExistingWikiLinks==undefined) config.options.chkDisableNonExistingWikiLinks= false;
if (config.options.chkDisableWikiLinks==undefined) config.options.chkDisableWikiLinks=false;
if (config.options.txtDisableWikiLinksList==undefined) config.options.txtDisableWikiLinksList="DisableWikiLinksList";
if (config.options.chkAllowLinksFromShadowTiddlers==undefined) config.options.chkAllowLinksFromShadowTiddlers=true;
if (config.options.txtDisableWikiLinksTag==undefined) config.options.txtDisableWikiLinksTag="excludeWikiWords";
// find the formatter for wikiLink and replace handler with 'pass-thru' rendering
initDisableWikiLinksFormatter();
function initDisableWikiLinksFormatter() {
for (var i=0; i<config.formatters.length && config.formatters[i].name!="wikiLink"; i++);
config.formatters[i].coreHandler=config.formatters[i].handler;
config.formatters[i].handler=function(w) {
// supress any leading "~" (if present)
var skip=(w.matchText.substr(0,1)==config.textPrimitives.unWikiLink)?1:0;
var title=w.matchText.substr(skip);
var exists=store.tiddlerExists(title);
var inShadow=w.tiddler && store.isShadowTiddler(w.tiddler.title);
// check for excluded Tiddler
if (w.tiddler && w.tiddler.isTagged(config.options.txtDisableWikiLinksTag))
{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
// check for specific excluded wiki words
var t=store.getTiddlerText(config.options.txtDisableWikiLinksList);
if (t && t.length && t.indexOf(w.matchText)!=-1)
{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
// if not disabling links from shadows (default setting)
if (config.options.chkAllowLinksFromShadowTiddlers && inShadow)
return this.coreHandler(w);
// check for non-existing non-shadow tiddler
if (config.options.chkDisableNonExistingWikiLinks && !exists)
{ w.outputText(w.output,w.matchStart+skip,w.nextMatch); return; }
// if not enabled, just do standard WikiWord link formatting
if (!config.options.chkDisableWikiLinks)
return this.coreHandler(w);
// just return text without linking
w.outputText(w.output,w.matchStart+skip,w.nextMatch)
}
}
Tiddler.prototype.coreAutoLinkWikiWords = Tiddler.prototype.autoLinkWikiWords;
Tiddler.prototype.autoLinkWikiWords = function()
{
// if all automatic links are not disabled, just return results from core function
if (!config.options.chkDisableWikiLinks)
return this.coreAutoLinkWikiWords.apply(this,arguments);
return false;
}
Tiddler.prototype.disableWikiLinks_changed = Tiddler.prototype.changed;
Tiddler.prototype.changed = function()
{
this.disableWikiLinks_changed.apply(this,arguments);
// remove excluded wiki words from links array
var t=store.getTiddlerText(config.options.txtDisableWikiLinksList,"").readBracketedList();
if (t.length) for (var i=0; i<t.length; i++)
if (this.links.contains(t[i]))
this.links.splice(this.links.indexOf(t[i]),1);
};
//}}}
Most Wwise SDK functions are available in Unity through the ''AkSoundEngine'' class. Think of it as the replacement of C++ namespaces ''AK::SoundEngine'', ''AK::MusicEngine'', etc. Please refer to the Wwise SDK help file for the API reference manual. See [[API changes and current limitations]] for changes made in the API binding compared to the original SDK.
The Integration provides a few example scripts to show how to use Wwise API in the Unity environment. The following scripts are mandatory in your project if you are not using sound positioning:
*[[AkGlobalSoundEngineInitializer.cs]]
*[[AkGlobalSoundEngineTerminator.cs]]
*[[AkGameObject.cs]]
To use positional sounds, [[AkListener.cs]] and [[AkGameObjectTracker.cs]] are required. They can all be modified as you need, but these classes must exist. See [[How-to: Set up a Unity project to use the Integration]] for remarks on script execution order.
[[AkGlobalSoundEngineInitializer.cs]] <<tiddler AkGlobalSoundEngineInitializer.cs>>
[[AkGlobalSoundEngineTerminator.cs]] <<tiddler AkGlobalSoundEngineTerminator.cs>>
[[AkGameObject.cs]] <<tiddler AkGameObject.cs>>
[[AkGameObjectTracker.cs]] <<tiddler AkGameObjectTracker.cs>>
[[AkEnvironment.cs]] <<tiddler AkEnvironment.cs>>
[[AkListener.cs]] <<tiddler AkListener.cs>>
[[AkBankPath.cs]] <<tiddler AkBankPath.cs>>
[[AkInMemBankLoader.cs]] <<tiddler AkInMemBankLoader.cs>>
See [[How-to: Build the Integration]] for general instructions on how to build the Integration, which applies to Android as well.
See [[How-to: Build the application for a multi-architecture platform]] for handling multi-architecture build.
!Build in the Unity Editor
When building for the first time in the Unity Editor, user will be prompted for choosing the locations of Android SDK, Android NDK, and Apache Ant. The specified locations will be saved in the [[Build Preference File]]. User then need to manually edit the entries in the preference file if different versions of these dependencies are to be used.
!Build on a Mac
As of v2013.2, Wwise does not distribute a Mac installer for Android. To build the Integration for Android on a Mac, it then requires to copy the necessary files of Wwise Android SDK from a PC distribution. A shell script is provided to this end, available at:
{{{
UNITY_PROJECT_ROOT/Assets/Wwise/AkSoundEngine/Android/CopyWwiseAndroidSDK.sh
}}}
Example:
{{{
CopyWwiseAndroidSDK.sh Source_Wwise_root_folder Destination_Wwise_root_folder
}}}
The folder locations have to be valid Unix paths. If the source is from the network, it has to be mounted onto the file system of the local Mac first.
!Deploy ~SoundBanks
Since Release 2013.1, SoundBanks for Android included in the APK can be directly accessed via LoadBank() APIs. SoundBanks placed under the ''StreamingAssets'' folder will be included in assets folder of the APK when building the Unity project. The new low-level IO (only the blocking version for Unity) will handle accessing SoundBanks transparently.
*In [[AkGlobalSoundEngineInitializer.cs]], an example is provided for how to initialize the Unity Android plugin to be ready to access SoundBanks in APKs, i.e., the ''InitalizeAndroidSoundBankIO()'' method.
*In [[AkGlobalSoundEngineInitializer.cs]], an example is provided to show how to pause and resume all sounds when switching the Unity Android app between foreground and background. A pair of global-scope Pause and Resume events on Master Control Bus need to be added to a shared SoundBank in user WwiseProject first. The example uses default names used in our IntegrationDemo, which need to be replaced by user-specified names if different.
See [[How-to: Build the Integration]] for general instructions on how to build the Integration, which applies to iOS as well. To test your Unity application on an iOS device, you need to build and deploy your app to the device. Upon hitting ''Build'' or ''Build and Run'' in Unity Editor, Unity generates an Xcode project based on the Unity scripts. Since Unity4.x, if iOS plugins are put under the folder
{{{
UNITY_PROJECT_ROOT/Assets/Plugins/iOS
}}}
there is no need for user to configure the Xcode project for the library dependencies.
However, a native iOS API call needs to be added to the generated Objective-C source file: AppController.mm or UnityAppController.mm:
*Add the following line to ''applicationWillEnterForeground:''
{{{
AK::SoundEngine::iOS::WakeupFromSuspend();
}}}
Build and run the Xcode project.
Unity does not yet support thumb instructions. So the ability to employ thumb instructions is disabled in the Xcode project.
The Integration comes pre-built. However, you may want to customize it by:
*modifying the C++ code that interfaces with the sound engine.
*upgrading your Integration by incorporating a more recent Wwise SDK release.
The Integration thus comes with the complete build environment so that you can perform the aforementioned tasks and rebuild the Integration yourself. Most build and deployment tasks can be done through the Unity Editor UI. The underneath process remains transparent to the users.
!The procedure
#Verify the [[Prerequisites]] for building the Integration.
#Import the Integration asset bundles for your target platforms. See [[How-to: Install the Integration]] for details.
#Build through the Unity Editor menu. Click the menu ''Wwise | Rebuild Integration | YourPlatform | YourArchitecture | YourConfiguration''.
#The first time you build the Integration, you will be prompted to specify the location of your Wwise SDK folder; after that, the location will be automatically saved in a [[Build Preference File]]. As long as the Build Preference File is present, the build script will use the stored settings to save the labour. To provide a different Wwise SDK location later, edit the preference file by hand or simply delete the file.
#Build now starts and may take a few minutes to finish. If the build succeeds, the plugins and API binding under the Deployment folder will be updated. The new plugin will then need to be installed to the [[Designated Platform Plugin Folder]] by following [[How-to: Install the Integration]].
!Additional notes
#During the build, you can watch the Editor console or Editor log to see warning, error, or critical messages, if any. The detailed log messages can be found in the [[Build Log File]].
!Alternative build method: Console utility
You can build the Integration from the command line using the [[Build Script]]. This is useful for continuous integration. 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
}}}
!Alternative build method: Integrated Development Environment (IDE)
Although rarely required, you can further customize the [[IDE solution of a target platform]] and build the Integration with a supported IDE. This is most useful when you want to add your own native C++ source files to the solution and expose your own native components to Unity scripts via [[SWIG]].
!Under the hood
The build process performs the following tasks:
#As a pre-build step, the API binding in Unity scripting language for Wwise SDK is generated via [[SWIG]], with our custom pre-processing and post-processing to ensure multi-platform API can coexist in Unity project folder.
#The Wwise SDK libraries are wrapped into a single library as the Unity plugin, 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. They are directly built into the Deployment folder. See [[How-to: Install the Integration]] for the folder structure.
!
Also see [[Platform-specific Information]].
See [[How-to: Build the Integration]] for general instructions about building the Integration.
There is no difference from the general instructions if you wish to build the Integration in the Unity Editor or from the command line.
The environment variable feature for GUI programs was removed in Mac OS X 10.8 Mountain Lion. If you wish to build the Integration with the Xcode GUI, allow the build script to find the native Wwise SDK by defining, in the Xcode project build settings, the custom build variable ''WWISESDK''
Separate plugin libraries are provided for the platforms with multiple architectures. They are named by suffixing the base name with the architectures. Therefore, multi-architecture plugin libraries can co-exist in the same [[Designated Platform Plugin Folder]], and need to be loaded in runtime correctly.
Although having platform preprocessor switches, Unity has no similar compile-time mechanisms for distinguishing architectures. To minimize user effort, however, predefined custom compiler preprocessors are available for switching between plugin libraries for different architectures.
Assume that those libraries are already installed by following [[How-to: Install the Integration]]. To use the correct plugin version for your build target, you can use the Unity 4's custom compiler preprocessor switch feature, also known as [[Scripting Define Symbols|http://docs.unity3d.com/Documentation/Components/class-PlayerSettings40.html]]. The predefined custom preprocessors are listed below.
| !Platform, Architecture | !Custom Preprocessor | !Default Architecture |h
|Android, armeabi-v7a |AK_ARCH_ANDROID_ARMEABIV7A | Yes |
|Metro, Win32 |AK_ARCH_METRO_WIN32 | Yes |
|Metro, ARM |AK_ARCH_METRO_ARM | No |
|Vita, SW |AK_ARCH_VITA_SW | Yes |
|Vita, HW |AK_ARCH_VITA_HW | No |
|Windows, Win32 |AK_ARCH_WINDOWS_WIN32 | Yes |
|Windows, x64 |AK_ARCH_WINDOWS_X64 | No |
To build for a specific architecture, enter the corresponding preprocessor into ''Build Settings | Player Settings | Scripting Define Symbols'', and then press Enter key of your keyboard (''IMPORTANT''). Note that there is no need to specify a preprocessor if you build for the default architecture of that platform.
!Windows 8 (Metro)
Your Windows Store app build may fail the Windows App Certification Kit (WACK) test if the plugins for both architectures are installed into the [[Designated Platform Plugin Folder]]. This is because Unity will include both plugins into the generated Visual Studio solution; the ARM version of the plugin will fail the WACK test. To fix this, simply remove the ARM version before running the WACK test. You can either remove the plugin file from the [[Designated Platform Plugin Folder]] before generating the Visual Studio solution, or remove the file from the generated solution folder before building the native Windows store app.
!Which plugin version to deploy
<<tiddler PluginConfiguration>>
!Deploy ~SoundBanks
When building a Unity application, the Unity Integration plugin and API binding can be deployed by Unity automatically. To deploy SoundBanks automatically, however, you need to place them under the [[StreamingAssets Folder]].
The example scripts [[AkBankPath.cs]] and [[AkGlobalSoundEngineInitializer.cs]] implements a multi-platform example for organizing ~SoundBanks. In the example, the ~SoundBanks are expected to be located under the folder
{{{
UNITY_PROJECT_ROOT/Assets/StreamingAssets/Audio/GeneratedSoundBanks/YourPlatform
}}}
Accordingly, the ''Base Path'' field in the Editor of your Unity project needs to be set to the relative path
{{{
Audio/GeneratedSoundBanks
}}}
Because Unity transfers all the contents under the StreamingAssets folder to the device without a built-in filtering mechanism, and because ~SoundBanks for multiple platforms are under the same parent folder, those ~SoundBanks for irrelevant platforms would be transferred along, which wastes storage space and deployment time. A custom [[PostProcessBuildPlayer]] script can help in this situation. Implement it so that it moves the irrelevant ~SoundBanks outside the StreamingAssets folder before the BuildPlayer starts to run, then move them back after the BuildPlayer stops. Since users may have non-audio content and application-specific structure in the StreamingAssets folder that require more elaborate filtering, this workaround is left for the users to implement.
!Exclude SoundBank metadata
Wwise generates SoundBank metadata files (e.g., .txt and .xml). They contain information about the banks to be used by your other pipeline tools, but are useless to the game. You may want to exclude them before deployment.
!
Also see: [[Platform-specific Information]]
To work with the Wwise profiler on Windows, Mac, and in the Unity Editor and Player, you need to allow your Unity game to run in background by enabling the field ''Run in Background'' in ''File | Build Settings | Player Settings | Settings'' for PC and Mac Standalone.
!The procedure
#''Open your Unity project in the Unity Editor.'' Stop any playing scene. On Windows, it is good practice to restart the Editor if a scene has just been played and stopped to avoid file locking.
#''Remove the existing version of the Integration.'' If an old Integration version exists, it is recommended that you manually remove all its files and folders first; ignore any resulting compiler errors in the console after that. But be careful when deleting the [[Example Unity scripts]]: Game object references to those scripts will be missing after the scripts are deleted. The references would need to be restored or revised manually.
#''Import the downloaded Unity asset bundle for your platform into your Unity project.'' This is done through double-clicking the bundle (.unitypackage), or through the menu ''Assets | Import Package | Custom Package ...''. When prompted with a content selection dialog, make sure all are selected and click ''Import''. A folder ''Wwise'' will appear at the root of the Assets folder; a new menu ''Wwise'' will appear in the menu bar. If otherwise, try to refresh the assets with the menu ''Assets | Refresh''.
#''Install a plugin version to the plugin folder.'' Click the menu ''Wwise | Install Plugins | [[YourPlatform]] | YourArchitecture | YourConfiguration''. A progress bar will be present during the installation. If all runs smoothly, the selected plugin version will appear in [[the designated location under the Plugins folder|Designated Platform Plugin Folder]]. The new file will overwrite the existing file of the same name. For single-architecture platforms, the step is similar with one fewer level of menu navigation.
#''Repeat the previous step for all your platforms.'' You will need to install at least one desktop version (Windows or Mac) to work in the Unity Editor.
At this point, you need to [[set up your Unity project to use the Integration|How-to: Set up a Unity project to use the Integration]]. See below the details about the Integration folder structure after the installation.
!The folder structure of the installed Unity Integration
*''StreamingAssets'': The [[StreamingAssets Folder]] used for automatic SoundBanks deployment.
*''Wwise'': The top-level folder.
**''AkSoundEngine'': The source code and IDE projects needed for building the Integration, organized by platforms.
***''Common'': The source code and build scripts used by all supported platforms.
***[[YourPlatform]]: The IDE solution or project, the source code, and platform-specific build scripts for the target platform.
***''Windows or Mac'': The IDE solution or project, the source code, and platform-specific build scripts for the desktop platform.
**''Deployment'': The main Integration files used in your application.
***''API'': The root-level folder of the API binding.
****''Generated'': API binding files automatically generated.
*****''Common'': API binding files shared by all supported platforms.
*****''~YourPlatform'': API binding files for a target platform.
*****''Windows or Mac'': API binding files for the desktop.
****''Handwritten'': API binding files written by hand.
***(Optional)''Dependencies'': 3rd-party Unity scripts required by certain platforms.
***''Examples'': The example Unity scripts that showcase how to integrate the Wwise SDK features into your application.
***''Plugins'': The Unity plugin libraries of various configurations and debug symbol databases.
****''~YourPlatform''
*****(Optional)''YourArchitecture'': Files shared by architectures of a multi-architecture platform.
******''Debug'': The Debug version of the plugin binaries. See "Which plugin version to deploy" for detail.
******''Profile'': The Profile version of the plugin binaries. See "Which plugin version to deploy" for detail.
******''Release'': The Release version of the plugin binaries. See "Which plugin version to deploy" for detail.
****''Windows or Mac'': The desktop version of the plugin libraries.
**''Documentation'': The full documents about the Integration.
**''[[SWIG]]'': The 3rd-party utility used to generate the API binding from the Wwise SDK. ''Note that the SWIG distribution shipped in the Integration contains our custom changes''.
**''Tools'': Application tools that provide extra features.
!Which plugin version to deploy
<<tiddler PluginConfiguration>>
!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 | http://developer.android.com/google/play/expansion-files.html]] is used for bundling the project assets. This effectively creates a zip file with the .obb extension, which contains the StreamingAssets folder, including the SoundBanks. The default Android SoundBank loading support assumes that SoundBanks are located in the APK (.apk) file. So when the OBB is used instead, SoundBanks need to be loaded without using the Wwise low-level IO hooks. Consequently, the in-memory loading method is required.
!How-to
An example in-memory SoundBank-loading API wrapper [[AkInMemBankLoader.cs]] is provided with the Integration. This MonoBehaviour 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:
#Enable ''AK_LOAD_BANK_IN_MEMORY'' preprocessor in ''PlayerSettings | Other Settings | Scripting Define Symbols'' (Press Enter key when done).
#Add the script as a component to any game object that needs to load a SoundBank.
#In the Inspector, enter the filename of the SoundBank into the field ''Bank Name'' of the script component.
#In the Inspector, check the option ''Is Localized Bank'' if the SoundBank is localized. It will use the global language defined in AkGlobalSoundEngineInitializer.cs.
#Disable any other SoundBank-loading methods and save the scene.
Two methods ''AkInMemBankLoader.LoadNonLocalizedBank()'' and ''AkInMemBankLoader.LoadLocalizedBank()'' can also be called directly in code for the non-localized and localized SoundBanks directly. See AkGlobalSoundEngineInitializer.cs for an example of loading the Init.bnk.
!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.
#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.
#The example is a blocking method.
If you app needs to pause and resume sounds after pressing home button and switching back from task switcher, work needs to be done on the application side:
#A pair of global-scope Pause and Resume events on Master Control Bus need to be added to a shared SoundBank in user WwiseProject first.
#In MonoBehavior.OnApplicationFocus(), user needs to call PostEvent() to post those global events conditioned by the pause or resume state argument.
In [[AkGlobalSoundEngineInitializer.cs]], an example is provided to show how to pause and resume all sounds when switching the Unity Android app between foreground and background. The example uses default event names used in our IntegrationDemo.
!Prerequisites
Assume that you have already done the following:
*Created a Wwise project using the Wwise authoring tool and generated the [[SoundBanks]] for your target platform(s).
*Installed the Integration by following [[How-to: Install the Integration]].
!The procedure
#''Set up sound engine initialization and termination scripts'':
##Load a scene.
##Create a new game object or select an existing game object as the sound engine object. It is best to use an object which is persistent throughout the game.
##Attach the scripts [[AkGlobalSoundEngineInitializer.cs]] and [[AkGlobalSoundEngineTerminator.cs]] to the sound engine object.
#''Set SoundBank path'':
##Set the property ''Base Path'' of [[AkGlobalSoundEngineInitializer.cs]] to the path to your Wwise ~SoundBanks. Usually, this should be a relative path to the [[StreamingAssets Folder]]. See [[How-to: Deploy the Integration to target devices]] for details on how to set up your ~SoundBank folder.
##In your Wwise authoring tool, you can set your generated SoundBank path to the ''Base Path'' in the previous step so that ~SoundBanks can be generated directly into that folder. The ~SoundBanks will actually be under a platform sub-folder under the ''Base Path''.
#(Optional) ''Set up positional sounds'': If your project utilizes sound positioning, you need the following steps:
##''Set an audio listener'': Attach the script [[AkListener.cs]] to a game object that represents the listener, e.g., the Main Camera object. Note that if multiple listeners are desired, you need to adapt this example to use different listener indices.
##''Set sound objects:'' Attach the script [[AkGameObjectTracker.cs]] to all the game objects that represent positional sounds.
#''Set the script execution order'': Open the Unity Editor menu ''Edit | Project Settings | Script Execution Order''. Add scripts to the list if necessary and set the list to the following order:
##[[AkGlobalSoundEngineInitializer.cs]]
##(Optional) Any custom SoundBank loader script, e.g., [[AkInMemBankLoader.cs]]
##[[AkListener.cs]]
##[[AkGameObject.cs]]
##[[AkGameObjectTracker.cs]]
##Any application scripts above the default priority
##''Default Time''
##Any application scripts below the default priority
##[[AkGlobalSoundEngineTerminator.cs]]
#''Allow Wwise profiling'': <<tiddler "How-to: Enable Wwise profiler to connect to Unity games">>
#(Optional) ''Convert the SoundBank ID header''. Compared to accessing ~SoundBanks by using their number IDs, it is a more convenient and reusable to refer to them as Unity script variables with the dot syntax (e.g., ''AK.EVENTS.STOP_ALL'') in code. To achieve that, click the menu ''Wwise | Convert Wwise SoundBank IDs''; then upon prompt, specify the location of the SoundBank ID C++ header (usually named as ''Wwise_IDs.h'') and confirm. A Unity script version of the ID header will be generated in place.
!Notes
*It is crucial to ensure that the sound engine should be initialized properly before any other audio calls are made, and terminated after all engine calls are completed. The correct script execution order is key to this requirement. In the application scripts you don't need to call the API function ''AkSoundEngine.IsInitialized()'' to ensure the initialization status, because this check is already done on the native side of the Integration; when API functions get called, error messages will appear in your debug console to remind you of setting the script execution order.
*It is possible to build a Wwise-powered Unity Windows application on a Mac machine and vice versa.
*We recommend that your Wwise project should sit outside the Assets folder of the Unity project for performance reasons. Wwise uses and generates lots of files that are unrelated to the final game assets and that Unity would try to parse anyway.
*The API binding files for different platforms can coexist under the same Unity project Assets folder and automatically switch between each other as you switch between target platforms in the Unity Editor.
*The API binding and example scripts will be bypassed if you switch to an unsupported platform in Build Settings. If your application scripts depend on those scripts, the client code segments need to be bypassed as well to avoid compiler errors. See [[Release Notes]] for supported platforms.
!How to test the Integration in the Unity project
#Make sure your Wwise project has a sound, an event that plays it, and a SoundBank that contains the event.
#Make sure the SoundBanks is generated at the right place (Base Path, mentioned earlier). For new Wwise users, make sure that you have generated the SoundBank header file (usually ''Wwise_IDs.h'') in Wwise and it is present in your Base Path. See [[Integration Demo]] for additional info if you would like to use SoundBanks by SoundBank ID variables in the header file in your C# scripts.
#In your Unity project, write a script that will trigger the following code: <<tiddler AkSoundEngineInitExample>>
#Add the script as a component to a game object in your scene.
#Run the scene and trigger the event.
Note that all errors reported by the sound engine are displayed in the Unity Console window. You can have more information about those errors by connecting with the Wwise profiler.
See [[How-to: Deploy the Integration to target devices]] for details on how to deploy SoundBanks.
See [[How-to: Build the application for a multi-architecture platform]] for how to apply plugins for different architectures under the same platform.
Additional work is needed to test and deploy your Unity game with Wwise to a platform like iOS. See [[How-to: Build and deploy the Integration to target devices (iOS)]] for details.
Located under
{{{
UNITY_PROJECT_ROOT/Assets/Wwise/AkSoundEngine/YourPlatform
}}}
the solution allows you to build the Integration for the target platform in a supported IDE. See the chart below for platform information.
| !Platform | !Solution file type |h
| Android |* For Windows users: .cmd<br> * For Mac users: .sh<br> * The platform folder can be opened as an Eclipse project |
| iOS |.xcodeproj |
| Mac |.xcodeproj |
| Metro |.sln |
| PS3 |.sln |
| Windows |.sln |
| Xbox360 |.sln |
A subset of Wwise SDK Integration Demo was ported to Unity as a Unity asset bundle (.unitypackage). Each package contains common scenes, scripts, the Integration plugin library (the Profile version) and API binding for the Unity Editor version. See below ''How-to: Install and run a demo scene'' for instructions.
The UI of the ported Integration Demos are adapted to exploit Unity's simplicity. The original menu system is replaced by a list of standalone Unity scenes. Therefore, instead of opening the main menu and navigating to a specific demo, user can now select a scene corresponding to the demo and play it directly in the Unity Editor using the Player.
For the [[Current Release]], the interactive demo scenes are best to be used in the Unity Editor (Windows or Mac) with a mouse and keyboard (if needed). There are limited input methods implemented for other platforms. However, any demo can be deployed to any supported platform, where the user can at least listen to the audio, view run-time information on screen, and profile with the Wwise authoring tool. We will consider adding full UI support for all supported platforms in future releases, or better yet, providing more exciting demos.
The available demos for the [[Current Release]] are:
*Dynamic Dialogue
*Interactive Music
*Localized Dialogue
*Music Callbacks
*RTPC
*Positioning
*Subtitles/Markers
The demos that require user interactions are:
*Interactive Music
*Localized Dialogue
*RTPC
*Positioning
!How-to: Install and run the Integration Demo
!!Step 1: Prepare the Unity Project
''Note:'' The Unity Integration Demo uses the same SoundBanks shipped with the native Wwise SDK <<tiddler "Current Release">>. Refer to [[How-to: Deploy the Integration to target devices]] for how to organize ~SoundBanks. If you wish to modify the ~SoundBanks, use the Authoring tool to load the native Integration Demo's Wwise project and regenerate the ~SoundBanks.
!!!Common Steps:
#Create an empty Unity project.
#Double-click the ''WwiseUnityIntegrationDemo_v<<tiddler "Current Release">>_[[YourPlatform]].unitypackage'' to install the Integration Demo in your new Unity project. Make sure to install the Integration Demo that corresponds to the platform on which you are running Unity. Where [[YourPlatform]] is Windows or Mac.
#Press the ''Import'' button in Unity to import the package content (scripts, SoundBanks, etc.) into your Unity Project.
#Display the ''Script Execution Order'' window (''Edit | Project Settings | Script Execution Order'').
#In the ''Inspector'' window, add and set the scripts in the following order by clicking the ''+'' button, selecting the script and then dragging the script to arrange the order.
##[[AkGlobalSoundEngineInitializer.cs]]
##[[AkInMemBankLoader.cs]]
##[[AkListener.cs]]
##[[AkGameObject.cs]]
##[[AkGameObjectTracker.cs]]
##[Default Time]
##[[AkGlobalSoundEngineTerminator.cs]]
#Press the ''Apply'' button when all scripts have been added and reordered properly.
!!!Windows/Mac Specific Steps:
#Display the ''Build Settings'' window (''File | Build Settings…'').
#Select the ''PC, Mac & Linux Standalone'' Platform.
#Press the ''Switch Platform'' button to make sure it becomes the active platform.
#Press the ''Player Settings…'' button under the listbox.
#In the ''Inspector'' window, click the ''Resolution & Presentation'' section and enable ''Run in Background'' (to run the Unity player in background and be able to connect Wwise to the Unity player afterward).
!!!Other Platform (Xbox360, PS3, Android, Metro, iOS) Specific Steps:
#Double-click the ''WwiseUnityIntegration_v<<tiddler "Current Release">>_[[YourPlatform]].unitypackage''.
#Press the ''Import'' button in Unity to import its content into your Unity Project.
#Copy the Integration Demo [[YourPlatform]] SoundBank folder into your project from <br> {{{WWISE_ROOT\SDK\samples\IntegrationDemo\WwiseProject\GeneratedSoundBanks\YourPlatform\*}}}<br> to {{{UNITY_PROJECT_ROOT\Assets\StreamingAssets\Audio\GeneratedSoundBanks\YourPlatform}}}.
#Install the Wwise Sound Engine plugin for your platform: ''Wwise | Install Plugins | [[YourPlatform]] | [[YourConfiguration]]''.
**For Android, install the relevant plugin version for the target device architecture.
**For Metro, install the relevant plugin version for the target device architecture: ARM or Win32. Note that you can install a different plugin version at any time.
***When building for an ARM device, choose ''Metro | ARM | [[YourConfiguration]]''.
***When building for a Win32 device, choose ''Metro | Win32 | [[YourConfiguration]]''.
!!Step 2: Play a scene from the Unity Integration Demo
!!!Windows/Mac
#Double-click a scene in the Unity ''Project'' window under: ''Assets | IntegrationDemo | Scenes | [CHOOSE YOUR SCENE HERE]'', e.g. DynamicDialogueScene
#Press the ''Play'' button in the ''Game'' window.
#Follow the instructions onscreen.
#Press the ''Play'' button once more to stop the previewer.
!!!Android
#Plug the Android device into your computer.
#Display the ''Build Settings'' window (''File | Build Settings…'') and select ''Android'' in the ''Platform'' list box.
#Press the ''Switch Platform'' button under the ''Platform'' list box.
#Drag and drop the scene you would like to preview ( ''Assets | IntegrationDemo | Scenes | e.g. DynamicDialogueScene'' ) from the ''Project'' window to the Build Settings ''Scenes in Build'' list box.
#*''Note:'' Only 1 scene should be active at a time. This will be the scene packaged in the Android APK later on.
#Press the ''Build and Run'' button to prepare and run the package.
#When prompted save the Android APK package.
#*The Unity scene will be built and automatically sent to your Android device.
#**''Note:''
#***You may receive an error stating ''No Android Device Found!''. In this case:
#****Copy the .apk file to your device.
#****Browse to and install the .apk file on your device.
#****Open the installed app (which will be named with the same name as your Unity project).
#*The scene will playback on the Android device.
#**''Note:''
#***Since support for the touch interface hasn't been fully implemented yet, you won't be able to chose any option in the onscreen menu, except for the Interactive Music and Localized Dialogue scene.
#***The Positioning Demo will not playback.
''Note:'' You do not need to uninstall the app between each scene playback. You will be prompted to overwrite it during the next Unity Integration Demo app installation.
!!!iOS
#Plug the iOS device in your Mac.
#Display the ''Build Settings'' window (''File | Build Settings…'') and select ''iOS'' in the ''Platform'' list box.
#Press the ''Switch Platform'' button under the ''Platform'' list box.
#Drag and drop the scene you would like to preview ( ''Assets | IntegrationDemo | Scenes | e.g. DynamicDialogueScene'') from the ''Project'' window to the Build Settings ''Scenes in Build'' list box.
#*Note: Only 1 scene should be active at a time. This will be the scene packaged in the iOS game later on.
#Press the ''Build and Run'' button in the ''Build Settings'' window.
#*This will generate an Xcode project, usually named ''Unity-iPhone''.
#Open the ''Unity-iPhone'' project in Xcode.
#Add the required native API calls according to [[How-to: Build and deploy the Integration to target devices (iOS)]].
#Make sure your iOS device is selected in the ''Destination'' menu in the upper-left corner.
#Press the ''Run'' button in the Xcode project.
#*The Unity scene will be built and automatically sent to your iOS device.
#*The scene will playback on the iOS device.
!!!Metro (Windows Store Apps x86)
#Display the ''Build Settings'' window (''File | Build Settings…'') and select ''Windows Store Apps'' in the ''Platform'' list box.
#Press the ''Switch Platform'' button under the ''Platform'' list box.
#In the dropdown menu on the right-side panel, switch the Windows Store Apps ''Type'' from ''D3D11 C# Solution'' to ''XAML C++ Solution''.
#Press the ''Build and Run'' button.
#Save the Unity package when prompted.
#Open the Visual Studio solution generated by Unity that can be found in the saved location of the Unity package.
#In Visual Studio, select ''Debug'' and ''Win32'' in the dropdown menu on the "Standard" toolbar.
#Build the Visual Studio solution (''Build | Build Solution'').
#The first time you will build a Metro App, you will have to acquire a developer license:
##In Visual Studio, choose ''Store | Acquire Developer License…''
##Create a Microsoft account or use an existing account.
##Log in and follow the instruction onscreen.
#Select your project in the ''Solution Explorer'' window.
#Create an App package (''Store | Create App Packages…'').
#In the ''Create Apps packages'' dialog, answer ''No'' when prompted ''Do you want to build packages to upload to the Windows Store''.
#Press the ''Create'' button to build the package.
#Press ''OK'' to close the dialog box.
#Select ''Local Machine'' from the ''Standard'' toolbar.
#*The Windows Store App will open and the scene will play.
#When the Unity Integration Demo is done playing, close the Windows Store App.
#You can uninstall the Windows Store App on your:
##Computer, by right-clicking the App to select it, then press the ''Uninstall'' button on the toolbar at the bottom and in the dialog box afterward.
##Tablet, by pressing and dragging down the ''Unity'' icon to select it, then press the ''Uninstall'' button on the toolbar at the bottom and in the dialog box afterward.
''Note:'' You need to uninstall the Windows Store App after every Unity Integration Demo scene test. Otherwise, you won't be able to install the new one containing the new scene as it is considered being the same Windows Store App.
!!!Metro (Windows Store Apps ARM)
#Display the ''Build Settings'' window (''File | Build Settings…'') and select ''Windows Store Apps'' in the ''Platform'' list box.
#Press the ''Switch Platform'' button under the ''Platform'' list box.
#In the dropdown menu on the right-side panel, switch the Windows Store Apps ''Type'' from ''D3D11 C# Solution'' to ''XAML C++ Solution''.
#Press the ''Player Settings…'' button under the list box.
#In the ''Inspector'' window, click the ''Other Settings'' label and type "AK_ARCH_METRO_ARM" in the ''Scripting Define Symbols'' edit box located in the ''Configuration'' section.
#*By default the ''Scripting Define Symbols'' are for ''Win32''.
#Press the ''Build and Run'' button in the ''Build Settings'' window.
#Save the Unity package when prompted.
#Open the Visual Studio solution generated by Unity that can be found in the saved location of the Unity package.
#In Visual Studio, select ''Debug'' and ''ARM'' in the dropdown menu on the ''Standard'' toolbar.
#Build the Visual Studio solution (''Build | Build Solution'').
#The first time you will build a Metro App, you will have to acquire a developer license:
##In Visual Studio, choose ''Store | Acquire Developer License…''
##Create a Microsoft account or use an existing account.
##Log in and follow the instruction onscreen.
#Select your project in the ''Solution Explorer'' window.
#Create an App package (''Store | Create App Packages…'').
#In the ''Create Apps packages'' dialog, answer ''No'' when prompted ''Do you want to build packages to upload to the Windows Store''.
#Press the ''Create'' button to build the package.
#Press ''OK'' to close the dialog box.
#Launch the ''Remote Debugger'' on the Tablet.
#*The ''Remote Tools for Visual Studio 2012 (ARM)'' need to be installed on the Tablet.
#In the Remote Debugger, first display the Options (''Tools | Options...''), then select ''No Authentication'' and ''Allow Any User to Debug''.
#In Visual Studio, right-click your Project name in the ''Solution Explorer'' and choose ''Properties''.
#In ''Configuration Properties | Debugging'' set the following values, then close the dialog:
##''Machine Name'' = xxx.xxx.xxx.xxx (IP Address of the Metro Tablet)
##''Require Authentication'' = No
#Press the ''Remote Machine'' button on the ''Standard'' toolbar to copy and run the Windows Store App on the Tablet.
#On your first attempt, you will be prompted to Sign In your Microsoft account to add a Developer License on the Tablet. Follow the instruction onscreen.
#*Once fully uploaded, the scene will be played back on the Tablet and you can use the touch interface to control the Unity Integration Demo.
#When the Unity Integration Demo is done playing, close the Windows Store App.
#You can uninstall the Windows Store App on your Tablet, by pressing and dragging down the ''Unity'' icon to select it, then press the ''Uninstall'' button on the toolbar at the bottom and in the dialog box afterward.
''Note:'' You need to uninstall the Windows Store App after every Unity Integration Demo scene test. Otherwise, you won't be able to install the new one containing the new scene as it is considered being the same Windows Store App.
!!!PS3
''Note:'' Make sure you already have a default PS3 console setup in the PS3 Target Manager
#Display the "Build Settings" window (''File | Build Settings…'') and select ''PS3'' in the ''Platform'' list box.
#Press the ''Switch Platform'' button under the ''Platform'' list box.
#Drag and drop the scene you would like to preview ( ''Assets | IntegrationDemo | Scenes | e.g. DynamicDialogueScene'') from the ''Project'' window to the Build Settings ''Scenes in Build'' list box.
#*''Note:'' Only 1 scene should be active at a time. This will be the scene packaged in the PS3 game later on.
#Press the ''Build and Run'' button to prepare and run the package.
#When prompted save the PS3 game package.
#The Unity scene will be built and automatically sent to your default PS3.
#*The scene will playback on the PS3.
#*''Note:''
#**Since support for the controller input hasn't been fully implemented yet, you won't be able to chose any option in the onscreen menu, except for the Positioning Demo scene.
#**The Localized Dialogue scene will not playback.
!!!Xbox360
''Note:'' Make sure you already have a default Xbox360 console setup in the Xbox360 Neighborhood.
#Display the ''Build Settings'' window (''File | Build Settings…'') and select ''XBox360'' in the ''Platform'' list box.
#Press the ''Switch Platform'' button under the ''Platform'' list box.
#Drag and drop the scene you would like to preview ( ''Assets | IntegrationDemo | Scenes | e.g. DynamicDialogueScene'') from the ''Project'' window to the Build Settings ''Scenes in Build'' list box.
#*''Note:'' Only 1 scene should be active at a time. This will be the scene packaged in the Xbox360 game later on.
#Press the ''Build and Run'' button to prepare and run the package.
#When prompted save the Xbox360 game package.
#The Unity scene will be built and automatically sent to your default Xbox360.
#*The scene will playback on the Xbox360.
#**''Note:''
#***Since support for the controller input hasn't been fully implemented yet, you won't be able to chose any option in the onscreen menu, except for the Positioning Demo scene.
#***The Localized Dialogue scene will not playback.
The Wwise Unity Integration consists of Wwise SDK API bindings in Unity scripting languages and a [[Unity plugin|http://unity3d.com/support/documentation/Manual/Plugins.html]] that allows the use of the Wwise sound engine in Unity games. It is referred to as ''the Integration'' in the rest of the document. The Integration delivers almost all Wwise SDK features to the Unity developers. This document describes the usage of the Integration.
It is assumed that you already have some knowledge about:
#The Wwise authoring application and the Wwise SDK. If not, please refer to the Wwise documentation first.
#Developing and maintaining a Unity project, including scripting, building, and testing applications.
The Integration is generated from a given Wwise SDK distribution directly, which contains:
#A Unity plugin library that contains all Wwise SDK libraries for the target platform.
#Wwise SDK API binding in a Unity scripting language.
Together, they allow using the Wwise API in Unity scripts in much the same manner as doing it in the native C/C++ programming.
Currently only C# scripting is supported.
See [[Release Notes]] for supported platforms, compatibility notes, and change history. The [[Current Release]] is <<tiddler "Current Release">>.
Please refer to the [[documentation for Xbox360 edition |WwiseUnityIntegration_Xbox360.html]] and [[documentation for PS3 edition|WwiseUnityIntegration_PS3.html]] for certain instructions on how to install and deploy the Integration to those platforms. ''These documents are available in the Documentation folder of their own platform packages only.''
!How to use this document
*New users are recommended to read the entire document.
*Veteran users can go to specific sections via the left sidebar or [[MainMenu]].
*Use the search bar on top-right of the page to search for any topics or keywords.
*All topic links are available on the right sidebar under the tab ''All''.
*Change history of the doc can be viewed under the tab ''Timeline''. This gives you hints about what may need your attentions.
You can browse [[Platform-specific Information]] for all platform-specific info regarding installation, deployment, and building the integration yourself. Links to the platform info is also given in the general sections.
See [[Integration Demo]] for information on the bundled examples.
See [[Contact]] for questions and support.
*As of 2013.1, remote connection is not functional for Windows 8 (Windows Store App) applications, meaning it is impossible to profile by connecting Wwise Authoring tool to a running Windows Store App integrated with Wwise SDK on a Windows 8 device.
*Windows Store Apps use regular Windows SoundBanks. There is no separate platform SoundBanks for Windows 8.
[[MainMenu]]
[[Introduction]]
[[Release Notes]]
[[Prerequisites]]
[[How-to: Install the Integration]]
[[How-to: Set up a Unity project to use the Integration]]
[[Example Unity scripts]]
[[How-to: Deploy the Integration to target devices]]
[[How-to: Build the Integration]]
[[API changes and current limitations]]
[[Platform-specific Information]]
[[Integration Demo]]
[[Contact]]
<div class='header' macro='gradient vert #355672 #1C2C3C'>
<div class='headerShadow'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
<div class='headerForeground'>
<span class='siteTitle' refresh='content' tiddler='SiteTitle'></span>
<span class='siteSubtitle' refresh='content' tiddler='SiteSubtitle'></span>
</div>
</div>
<div id='mainMenu'>
<div refresh='content' tiddler='MainMenu'></div>
</div>
<div id='sidebar'>
<div id='sidebarOptions' refresh='content' tiddler='SideBarOptions'></div>
<div id='sidebarTabs' refresh='content' force='true' tiddler='SideBarTabs'></div>
</div>
<div id='displayArea'>
<div id='messageArea'></div>
<div id='tiddlerDisplay'></div>
</div>
!Android
[[How-to: Build and deploy the Integration to target devices (Android)]]
[[How-to: Pause and resume sounds while switching app between foreground and background]]
[[How-to: Load SoundBanks from an APK expansion file (OBB)]]
[[How-to: Build the application for a multi-architecture platform]]
!iOS
[[How-to: Build and deploy the Integration to target devices (iOS)]]
!Mac OS X
[[How-to: Build the Integration using Xcode GUI on Mac OS X Mountain Lion]]
!PS3
[[Documentation for PS3|WwiseUnityIntegration_PS3.html]] (available in PS3 edition only)
!Windows
[[How-to: Build the application for a multi-architecture platform]]
!Windows 8
[[How-to: Build the application for a multi-architecture platform]]
[[Limitations: Windows 8]]
!Xbox360
[[Documentation for Xbox360|WwiseUnityIntegration_Xbox360.html]] (available in Xbox360 edition only)
Three versions of the Integration plugin library are provided: ''Debug'', ''Profile'' and ''Release''. ''Profile'' version should be used throughout the development. It allows the Wwise Profiler to connect to your application. The final shipping version of the game should use the ''Release'' version which removes the connection and profiling code. ''Debug'' should be used only if there are specific issues with the sound engine itself that need to be debugged, usually with the help of Audiokinetic’s support.
[[A Unity build pipeline feature|http://docs.unity3d.com/Documentation/Manual/BuildPlayerPipeline.html]]: "After building a player Unity automatically looks for a sh or perl script called PostprocessBuildPlayer (without any extension) in your Project's Assets/Editor folder. If the file is found, it is invoked when the player finishes building."
!The prerequisites for using the pre-built Integration
To use the Integration in your Unity application, the following needs to be installed on your system:
| !Platform | !Required components |h
| All platforms |<<tiddler "Supported Unity Versions">> |
| iOS |<<tiddler "Supported Xcode Versions">> with compatible iOS SDK |
| Windows |DirectX End-User runtime |
| Windows 32bit Debug |Visual Studio 2008 Redistributable |
!The prerequisites for building the Integration yourself
If you wish to customize or upgrade your Integration with later Wwise releases, you will need the following on your system to rebuild the Integration yourself.
| !Platform | !Required components |h
| All platforms |* <<tiddler "Supported Unity Versions">>.<br>* Compatible Wwise SDK for your target platform(s). See [[Release Notes]].<br>* Compatible platform SDK for your target platform(s). Refer to Wwise SDK help (Section ''Reference Materials | Platform Requirements'').<br>* Python 2.7.x or 3.x, with Python executable folder in your system executable path. |
| Android |* Cygwin (Windows only).<br>* Android SDK.<br>* Android NDK.<br>* Apache Ant.<br>* The path to the Wwise SDK should not contain any white spaces.<br>* The path to UNITY_PROJECT_ROOT should not contain any white spaces.<br>* Environment variables:<br>** CYGWIN_HOME should point to the Cygwin root folder (Windows Only).<br>** ANDROID_HOME should point to the Android SDK root folder.<br>** ANDROID_NDK_ROOT should point to the Android NDK root folder.<br>** ANT_HOME should point to the Apache Ant root folder. |
| iOS |* <<tiddler "Supported Xcode Versions">>.<br>* [[SWIG|Compile and install SWIG]]. |
| Mac |* <<tiddler "Supported Xcode Versions">>.<br>* [[SWIG|Compile and install SWIG]]. |
| PS3 |Visual Studio 2010 Professional Edition. |
| Vita |Visual Studio 2010 Professional Edition. |
| Windows |Visual Studio 2008 Professional Edition. |
| Windows 8 (Metro) |* Visual Studio 2012. <br>* Wwise SDK for Windows. |
| Xbox360 |Visual Studio 2010 Professional Edition. |
*2012.1.1
*2012.1
*Windows-only release
/***
|''Name:''|Publish Macro|
|''Version:''|2.4.1 (2 July 2008)|
|''Source''|http://jackparke.googlepages.com/jtw.html#PublishMacro ([[del.icio.us|http://del.icio.us/post?url=http://jackparke.googlepages.com/jtw.html%23PublishMacro]])|
|''Author:''|[[Jack]]|
|''Type:''|Macro|
!Description
<<doPublish>> tiddlers tagged with these tags <<option txtPublishTags>> (comma seperated) as HTML pages to the subfolder 'publish' (you must create this). Use the [[PublishTemplateHead]] and [[PublishTemplateBody]] templates to style your pages and the [[PublishIndexTemplate]] to define an index page. For publishing individual tiddlers the [[PublishTemplateBodySingle]] template is used.
!Usage
To publish all tagged tiddlers:
{{{<<doPublish>>}}} <<doPublish>>
To publish a single tiddler, use the {{{<<publishTiddler>>}}} macro or add the "publishTiddler" command to your ViewTemplate
!Template placeholders
|!Placeholder|!Meaning|
|%0|Your SiteTitle "<<tiddler SiteTitle>>"|
|%1|The current tiddler title|
|%2|The rendered tiddler HTML|
|%3|CSV list of tags|
|%4|Tiddler modifier|
|%5|Tiddler modified date|
|%6|Tiddler creation date|
|%7|Tiddler wiki text|
!Revision History
* Original by [[Jack]] 24 May 2006
* Updated 2 Jan 2007
* Refactored 4 Jan 2007
* Small improvements
* Publish single tiddlers
* Template placeholder %7 for tiddler's wiki text
!Code
***/
//{{{
version.extensions.doPublish = {
major: 2,
minor: 4,
revision: 1,
date: new Date("July 2, 2008")
};
config.macros.doPublish = {
label: "publish",
prompt: "Publish Tiddlers as HTML files"
};
if (config.options.txtPublishTags == undefined) config.options.txtPublishTags = "Publish";
config.shadowTiddlers.PublishTemplateHead = '<title>%0 - %1</title>\n<link rel="stylesheet" type="text/css" href="style.css"/>\n<meta name="keywords" content="%3"/>'
config.shadowTiddlers.PublishTemplateBody = '<div class=\'viewer\' id=\'contentWrapper\'><small><a href=\"./publish/index.html\">Home</a> > %1</small><h1>%0</h1>\n<h2>%1</h2>\n%2\n<hr>Tags: %3\n<hr>%4, %5 (created %6)\n</div>\n'
config.shadowTiddlers.PublishTemplateBodySingle = '<h1>%0</h1>\n<h2>%1</h2>\n%2\n<hr>Tags: %3\n<hr>%4, %5 (created %6)\n</div>\n'
config.shadowTiddlers.PublishIndexTemplate = '<div class=\'viewer\' id=\'contentWrapper\'><small><a href="./publish/index.html">Home</a> > %1</small><h1>%0</h1><h2>%1</h2>\n<ul>%2\n</ul>\n<small>Published: %6</small>\n</div>\n';
config.macros.doPublish.handler = function(place)
{
if (!readOnly)
createTiddlyButton(place, this.label, this.prompt,
function() {
doPublish();
return false;
},
null, null, this.accessKey);
}
config.macros.publishTiddler = {
label : 'publish',
prompt : 'Publish this tiddler as an HTML file.',
handler : function(place,macroName,params,wikifier,paramString,tiddler)
{
var btn = createTiddlyButton(place, this.label, this.prompt,
function(e) {
if(!e) var e = window.event;
publishTiddler(this.getAttribute('tiddler'))
return false;
},
null, null, this.accessKey);
btn.setAttribute('tiddler', tiddler.title);
}}
config.commands.publishTiddler = {handler : function(event,src,title) {publishTiddler(title);},text: "publish", tooltip: "Publish this tiddler as HTML"};
function publishTiddler(title) {
//debugger
var PublishFolder = getWikiPath('publish');
var place = document.getElementById(story.container)
var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");
var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBodySingle") || store.getTiddlerText("PublishTemplateBody");
HTMLTemplateBody = renderTemplate(HTMLTemplateBody)
HTMLTemplateBody = wiki2Web(HTMLTemplateBody);
var tiddler = store.getTiddler(title);
var tiddlerText = store.getValue(tiddler, 'text');
var tiddlerHTML = wikifyStatic(tiddlerText);
var HTML = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + HTMLTemplateBody + '\n</body>\n</html>';
HTML = HTML.format([
wikifyPlain("SiteTitle").htmlEncode(),
tiddler.title.htmlEncode(),
wiki2Web(tiddlerHTML),
tiddler.tags.join(", "),
tiddler.modifier,
tiddler.modified.toLocaleString(),
tiddler.created.toLocaleString(),
tiddlerText
]);
saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);
//story.closeTiddler(tiddler.title);
var indexWin = window.open((PublishFolder + title.filenameEncode() + ".html").replace(/\\/g, "/"), null);
indexWin.focus();
}
function doPublish() {
var savedTiddlers = [];
var tiddlers = store.getTiddlers("title");
var place = document.getElementById(story.container)
var HTMLTemplateHead = store.getTiddlerText("PublishTemplateHead");
var HTMLTemplateBody = store.getTiddlerText("PublishTemplateBody");
HTMLTemplateBody = renderTemplate(HTMLTemplateBody)
HTMLTemplateBody = wiki2Web(HTMLTemplateBody);
var PublishTags = config.options.txtPublishTags || "publish";
PublishTags = PublishTags.split(",")
var PublishFolder = getWikiPath('publish');
if (!PublishFolder) return;
var indexFile = "";
var indexFileTemplate = store.getTiddlerText("PublishIndexTemplate");
// This does not allow <<myMacro>> but wants <div macro="myMacro">
indexFileTemplate = renderTemplate(indexFileTemplate)
// This option allows WIKI-syntax but is limited in it's HTML capabilities
//indexFileTemplate = wikifyStatic(indexFileTemplate)
for (var t = 0; t < tiddlers.length; t++) {
var tiddler = tiddlers[t];
if (tiddler.tags.containsAny(PublishTags)) {
var tiddlerText = store.getValue(tiddler, 'text');
var tiddlerHTML = wikifyStatic(tiddlerText);
var HTML = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + HTMLTemplateBody + '\n</body>\n</html>';
HTML = HTML.format([
wikifyPlain("SiteTitle").htmlEncode(),
tiddler.title.htmlEncode(),
wiki2Web(tiddlerHTML),
tiddler.tags.join(", "),
tiddler.modifier,
tiddler.modified.toLocaleString(),
tiddler.created.toLocaleString(),
tiddlerText
]);
//saveFile(PublishFolder + tiddler.created.formatString("YYYY0MM0DD") + ".html", HTML);
saveFile(PublishFolder + tiddler.title.filenameEncode() + ".html", HTML);
indexFile += "<li><a href=\"" + tiddler.title.filenameEncode() + ".html" + "\" class=\"tiddlyLink tiddlyLinkExisting\">" + tiddler.title + "</a></li>\n";
story.closeTiddler(tiddler.title);
}
}
indexFileTemplate = '<html>\n\<head>\n' + HTMLTemplateHead + '\n</head>\n<body>\n' + indexFileTemplate + '\n</body>\n</html>';
indexFileTemplate = indexFileTemplate.format([wikifyPlain("SiteTitle").htmlEncode(), wikifyPlain("SiteSubtitle").htmlEncode(), "%2", "", "", "", (new Date()).toLocaleString()])
indexFile = indexFileTemplate.replace("%2", indexFile)
indexFile = wiki2Web(indexFile);
saveFile(PublishFolder + "index.html", indexFile)
saveFile(PublishFolder + "style.css", store.getTiddlerText("StyleSheet") + store.getTiddlerText("StyleSheetLayout") + store.getTiddlerText("StyleSheetColors"))
var indexWin = window.open("file://" + PublishFolder.replace(/\\/g, "/") + "index.html", null);
indexWin.focus();
}
function renderTemplate(html) {
var result = document.createElement("div");
result.innerHTML = html;
applyHtmlMacros(result, null);
var temp = result.innerHTML;
//result.parentNode.removeChild(result);
return temp;
}
// Convert wikified text to html
function wiki2Web(wikiHTML) {
//var regexpLinks = new RegExp("<a tiddlylink=.*?</a>", "img");
var regexpLinks = /<a[^>]+tiddlylink\s*=\s*["']?\s*?([^ "'>]*)\s*["']?[^>]*>[^<]+<\/a>/img;
var result = wikiHTML.match(regexpLinks);
if (result) {
for (i = 0; i < result.length; i++) {
var className = result[i].match(/ class="(.*?)"/i) ? result[i].match(/ class="(.*?)"/i)[1] : "";
var tiddlerName = result[i].match(/ tiddlylink="(.*?)"/i)[1];
var url = tiddlerName.htmlDecode().filenameEncode() + ".html";
var tiddlerLabel = result[i].match(/">(.*?)<\/a>/i)[1];
if (!className.match(/tiddlyLinkNonExisting/i))
wikiHTML = wikiHTML.myReplace(result[i], "<a class=\"" + className + "\" href=\"" + url + "\">" + tiddlerLabel + "</a>");
else
wikiHTML = wikiHTML.myReplace(result[i], "<a class=\"" + className + "\" title=\"Page does not exist\" href=\"#\">" + tiddlerName + "</a>");
}
wikiHTML = wikiHTML.replace(/ href="http:\/\//gi, " target=\"_blank\" href=\"http://");
}
return wikiHTML
}
function getWikiPath(folderName) {
var originalPath = document.location.toString();
if (originalPath.substr(0, 5) != 'file:') {
alert(config.messages.notFileUrlError);
if (store.tiddlerExists(config.messages.saveInstructions))
story.displayTiddler(null, config.messages.saveInstructions);
return;
}
var localPath = getLocalPath(originalPath);
var backSlash = localPath.lastIndexOf('\\') == -1 ? '/': '\\';
var dirPathPos = localPath.lastIndexOf(backSlash);
var subPath = localPath.substr(0, dirPathPos) + backSlash + (folderName ? folderName + backSlash: '');
return subPath;
}
// Replace without regex
String.prototype.myReplace = function(sea, rep) {
var t1 = this.indexOf(sea);
var t2 = parseInt(this.indexOf(sea)) + parseInt(sea.length);
var t3 = this.length;
return this.substring(0, t1) + rep + this.substring(t2, t3)
}
// Convert illegal characters to underscores
String.prototype.filenameEncode = function()
{
return (this.toLowerCase().replace(/[^a-z0-9_-]/g, "_"));
}
//}}}
''Current release: <<tiddler "Current Release">>''
!Wwise Unity Integration 2013.2.4
This release delivers Wwise SDK update for Wwise 2013.2.4, bug fixes, and improvements.
''Compatibility:''
*Wwise SDK: 2013.2, 2013.2.x
*Unity: 4.x
''Supported Platforms:''
*Windows 8 (Metro)
**Desktop
**Windows Store App on Intel devices and ARM tablets
*Windows
**32bit
**64bit
*Mac OS X (10.6 and above)
*iOS
*Android
*Xbox360
*PS3
''New Features:''
*New menu item ''Wwise | Help'' for opening the Integration documentation in the default web browser.
*Added Version.txt metadata file to all distributions to indicate the base Wwse SDK info.
''Resolved Issues:''
*WG-24080: Compiler errors after switching to Android with both Windows and Mac APIs present.
''Migrations:''
*Removed Android armeabi plugins.
!Wwise Unity Integration 2013.2.1
This release delivers Wwise SDK update for Wwise 2013.2.1, new features including an overhauled distribution, installation and build experience, and bug fixes.
''Compatibility:''
*Wwise SDK: 2013.2, 2013.2.1
*Unity: 4.x (3.x is no longer supported)
''Supported Platforms:''
*Windows 8 (Metro)
**Desktop
**Windows Store App on Intel devices and ARM tablets
*Windows
**32bit
**64bit
*Mac OS X (10.6 and above)
*iOS
*Android
*Xbox360
*PS3
''New Features:''
*Unity Integration is now distributed as a Unity asset bundle that contains the target platform version and the desktop version. It can be imported directly into a Unity project, and function in both the Editor and on target devices.
*A new Wwise menu was added in the Unity Editor UI for the following tasks:
**Installing the plugin.
**Rebuilding the Integration.
**Converting a SoundBank ID C++ header into its C# version.
*Build and run applications for multi-architecture platforms (e.g., Windows) with Unity 4's [[Scripting Define Symbols|http://docs.unity3d.com/Documentation/Components/class-PlayerSettings40.html]] feature.
*A build script for rebuilding the Integration for any supported platforms through the command line.
*A simplified positioning demo is added to the IntegrationDemo.
*Android: SoundBanks can now be saved in and loaded from the [[Android Expansion Files|http://developer.android.com/google/play/expansion-files.html]] (OBB).
''Resolved Issues:''
*WG-23781: Bank callback does not work.
*WG-23734: Marker callback receives garbled strings on Windows platforms.
*WG-23345: Compiler errors when switching to unsupported platforms in Unity Editor.
*WG-23436: Unity: listener positioning error due to wrong index type cast.
*WG-23423: Performance issue with GameObjects in Unity related to component access.
*WG-22533: Unity: Some API binding functions shouldn't have exception handlers.
''Improvements:''
*Simplified iOS plugin installation and deployment.
*Updated documentation with more accurate prerequisites and other instructions.
''Migrations:''
*The installed file and folder structure is updated for the new distribution method. See [[How-to: Install the Integration]] for details.
*The plugins for multi-architecture platforms are renamed. See [[How-to: Build the application for a multi-architecture platform]] for details.
*On iOS, there is no longer a need to configure Xcode project to find the plugin library. But a new native API call is needed. See [[How-to: Build and deploy the Integration to target devices (iOS)]] for details.
*The previous multi-architecture platform build UI script examples are removed.
*The old build script for the Apple platforms is removed.
*SWIG is upgraded to 2.0.11. Mac users need to refer to [[Compile and install SWIG]] to update SWIG.
!Wwise Unity Integration 2013.1.1
This release includes Wwise SDK update for Wwise 2013.1.1. No other changes were made in the Integration.
!Wwise Unity Integration 2013.1
This release includes Wwise SDK update for Wwise 2013.1, Android-related new features and general bug fixes.
''Compatibility:''
*Wwise SDK: 2012.2.x, 2013.1
*Unity: 3.4.x, 3.5.x, 4.x
''Supported Platforms:''
*Windows 8
**Desktop
**Windows Store App on Intel devices and ARM tablets
*Windows (32bit)
*Windows (64bit)
*Mac OS X (10.6 and above)
*iOS
*Android
*Xbox360
*PS3
''New Features:''
*Android: SoundBanks can now be saved in Android application packages (apk) and are accessible transparently using LoadBank() APIs.
*Support for Windows 64bit.
*Support for Windows 8.
''Resolved Issues:''
*WG-22948: Positioning error due to listener index assignment error on PS3.
*WG-22938: Positioning data passed by Unity Integration on Mac OSX is invalid.
*WG-22334: Music userCue names are incorrectly reported to Unity as empty strings.
*WG-22329: Cannot PostEvent() to global scope with Unity Integration.
*WG-22255: Unity Android: Sound persists after switching app to background.
*WG-22165: 3D positioning does not work properly under iOS and Android.
*WG-21933: AkCallbackManager.cs handles deserialization of floats incorrectly. UserCue names broken.
*WG-21365: Unity iOS: Cannot hear sounds after iOS audio interruption events come and go.
*WG-22533: Some API binding functions shouldn't have exception handlers.
''Improvements:''
*Windows and Mac distributions can coexist in the same Unity project.
*Improved documentation readability and accuracy and added [[Platform-specific Information]] section for easily reading the info about platforms of interest.
*Build logs now supports quiet and verbose modes for readability.
*Build pipeline now checks user Python version and warns if it is outdated.
*Deployment script can now be used directly to copy the Integration to Unity projects.
''Migrations:''
*Visual Studio 2010 is now required to build the Integration for PS3.
*Build scripts no longer supports Python 2.6 and lower versions. Python 2.7.x or 3.x is required.
*The environment variable UNITY_PROJECT_ROOT is no longer required for building the Integration yourself. By default, the Integration is no longer automatically deployed to the folder specified by UNITY_PROJECT_ROOT. See [[How-to: Build the Integration]] for details.
*Android build scripts no longer deploy PostprocessBuildPlayer scripts to Unity projects.
*IntegrationDemo project is upgraded to Unity4 format.
!Wwise Unity Integration 2012.2.1
This release includes Wwise SDK update for Wwise 2012.2, and bug fixes.
''Compatibility:''
*Wwise SDK: 2012.2, 2012.2.1
*Unity: 3.4.x, 3.5.x, 4.0
''Supported Platforms:''
*Windows (32bit)
*Mac OS X (Including 10.8 Mountain Lion)
*iOS
*Android
*Xbox360
*PS3
''Resolved Issues:''
*Crash on Xbox360 in Wwise callbacks during .NET marshalling.
*Potential crash on Mac when using OggVorbis soundbanks when the SDK was built using post-Xcode4.2 compilers.
''Improvements:''
*When generating API bindings, UNITY_PROJECT_ROOT environment variable is no longer needed.
!Wwise-Unity Integration 2012.2
This release includes Wwise SDK update for Wwise 2012.2, compatibility change for Mac OS X Mountain Lion, and bug fixes. Note this release is incompatible with Wwise SDK 2012.1 and older versions.
''Compatibility:''
*Wwise SDK: 2012.2
*Unity: 3.4.x, 3.5.x, 4.0
''Supported Platforms:''
*Windows (32bit)
*Mac OS X (Including 10.8 Mountain Lion)
*iOS
*Android
*Xbox360
*PS3
''Resolved Issues:''
*Some callbacks such as music beat and bar callbacks don't work on some platforms.
''Improvements:''
*Added support for building the Integration on Mac OS X Mountain Lion.
*Added support for building the Integration for Xbox360 using Visual Studio 2012 environment.
!Wwise Unity Integration 2012.1.4
This release introduces supports for more platforms, great improvements in build pipeline, and important bug fixes. We suggest that you upgrade your previous Wwise Unity Integration right away. Please read the documentation carefully to adopt the changes made since previous releases.
''Compatibility:''
*Wwise SDK: 2012.1.x
*Unity: 3.4.x, 3.5.x
''Supported Platforms:''
*Windows (32bit)
*Mac OS X
*iOS
*Android
*Xbox360
*PS3
''New Features:''
*Support for Android
*Support for ~PS3.
*Users now can deploy different platform editions of the Integration to the same Unity project and switch between them without conflicts in Unity namespace or having to swap files by hand.
*SoundBanks can now be deployed to the game automatically as part of Unity build pipeline.
*~MotionEngine and Query APIs are now exposed.
*Ported a subset of Wwise SDK IntegrationDemo as a demo Unity project (as part of Windows and Mac packages).
''Resolved Issues:''
*Random crashes caused by wrong Unity script execution orders, e.g., calling SDK API without initializing sound engine first.
*Random crashes in callback manager during sound engine termination.
*Unity projects with the thumb-enabled plugin crash on armv6 iOS devices (a workaround for Unity limitation).
*Playlist class for dynamic sequence cannot use inherited AkArray functions.
''Improvements:''
*The Integration build pipelines are refactored in Python for better cross-platform transparency and maintainability.
*Improved SWIG interface.
*Improved generated API name clarity by renaming some generated API functions after SWIG removes all namespaces.
*Updated and improved documentation, using [[Tiddlywiki|http://www.tiddlywiki.com/]].
''Misc:''
*Updated SWIG to 2.0.7.
!Wwise Unity Integration 2012.1.1
This release includes important bug fixes, along with minor improvements. We suggest that you upgrade your previous Wwise Unity Integration right away.
''Compatibility:''
*Wwise SDK: 2012.1, 2012.1.1
*Unity: 3.4, 3.5
''Supported Platforms:''
*Windows (32bit)
*Mac OS X
*iOS
*Xbox360
''Resolved Issues:''
*The plugin was still using low-level file IO location resolver from Wwise 2011.3 when it should have been the 2012.1 version. The problem can cause streaming issues.
*On non-Windows platforms, Wwise error logs didn't show up correctly in Unity console.
*Some Dynamic Sequence APIs were not added to the plugin binaries.
''Improvements:''
*Default iOS distributions are now compatible with armv6 architectures.
*Added example scripts for deploying Soundbanks to game app for Windows, Mac, and iOS.
*Added debug symbols to all configurations of all platforms in the default distribution.
*Updated and improved documentation. Added more instructions for deploying Soundbanks, and enabling Wwise profiler support for Unity projects on Windows, Mac, and in Unity Editor.
*Prebuild script now supports Python 2.x (2.6+) and 3.x.
*Postbuild script now first remove previously generated C# bindings to avoid possible conflicts from SWIG interface changes or existing scripts for other platforms.
*Simplified and improved Mac and iOS build scripts.
*Added release notes to the package.
!Wwise Unity Integration 2012.1
This release added Wwise SDK integration for Unity on Windows (32bit), Mac OS X, iOS, and Xbox360 platforms.
''Compatibility:''
*Wwise SDK: 2012.1, 2012.1.1
*Unity: 3.4, 3.5
''Supported Platforms:''
*Windows (32bit)
*Mac OS X
*iOS
*Xbox360
"SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages." - [[SWIG website|http://www.swig.org]]
Wwise Unity Integration (Standard)
.bnk and .wem files generated from Wwise authoring tool.
Located at
{{{
UNITY_PROJECT_ROOT/Assets/StreamingAssets
}}}
When using build-and-run, all contents under this folder are automatically deployed by Unity to the target device. Manually create one if none exists in your Unity project and you wish to use its functionality. See Unity's [[StreamingAssets|http://unity3d.com/support/documentation/Manual/StreamingAssets.html]] feature for details.
/*{{{*/
body {
background: #355672;
}
/*}}}*/
/***
!Link styles /% ============================================================= %/
***/
/*{{{*/
a,
a.button,
#mainMenu a.button,
#sidebarOptions .sliderPanel a{
color: #B4C14B;
border: 0;
background: transparent;
}
a:hover,
a.button:hover,
#mainMenu a.button:hover,
#sidebarOptions .sliderPanel a:hover {
color: #FFFFFF;
border: 0;
border-bottom: #FFFFFF;
background: transparent;
text-decoration: none;
}
#sidebarOptions .sliderPanel a:active{
color: #B4C14B;
border: 0;
border-bottom: #FFFFFF;
background: transparent;
text-decoration: none;
}
#displayArea .button.highlight{
color: #B4C14B;
background: #355672;
}
/*}}}*/
/***
!Header styles /% ============================================================= %/
***/
/*{{{*/
.header{
border-bottom: 2px solid #3A6E8E;
color: #fff;
}
.headerForeground a {
color: #fff;
}
.headerBackground a {
color: #3A6E8E;
}
.header a:hover {
border-bottom: 1px dashed #fff;
}
/*}}}*/
/***
!Main menu styles /% ============================================================= %/
***/
/*{{{*/
#mainMenu {color: #fff;}
#mainMenu h1{
font-size: 1.1em;
}
#mainMenu li,#mainMenu ul{
list-style: none;
margin: 0;
padding: 0;
}
/*}}}*/
/***
!Sidebar styles /% ============================================================= %/
***/
/*{{{*/
#sidebar {
right: 0;
color: #fff;
border: 2px solid #3A6E8E;
border-width: 0 0 2px 2px;
}
#sidebarOptions {
background-color: #355672;
padding: 0;
}
#sidebarOptions a{
margin: 0;
color: #FFFFFF;
border: 0;
}
#sidebarOptions a:hover {
color: #B4C14B;
background-color: #0F1B22;
}
#sidebarOptions a:active {
color: #355672;
background-color: transparent;
}
#sidebarOptions .sliderPanel {
background-color: #355672;
margin: 0;
}
#sidebarTabs {background-color: #355672;}
#sidebarTabs .tabSelected {
padding: 3px 3px;
cursor: default;
color: #FFFFFF;
background-color: transparent;
}
#sidebarTabs .tabUnselected {
color: #FFFFFF;
background-color: 3A6E8E;
padding: 0 4px;
}
#sidebarTabs .tabUnselected:hover,
#sidebarTabs .tabContents {
background-color: #355672;
}
.listTitle{color: #FFF;}
#sidebarTabs .tabContents a{
color: #B4C14B;
}
#sidebarTabs .tabContents a:hover{
color: #FFFFFF;
background: transparent;
}
#sidebarTabs .txtMoreTab .tabSelected,
#sidebarTabs .txtMoreTab .tab:hover,
#sidebarTabs .txtMoreTab .tabContents{
color: #FFFFFF;
background: #355672;
}
#sidebarTabs .txtMoreTab .tabUnselected {
color: #FFFFFF;
background: #355672;
}
.tab.tabSelected, .tab.tabSelected:hover {
color: #FFFFFF;
border: 0;
background-color: #1C2C3C;
cursor:default;
}
.tab.tabUnselected {background-color: #3A6E8E;}
.tab.tabUnselected:hover{color:#FFFFFF; border: 0;background-color: #4c4c4c;}
.tabContents {
background-color: #355672;
border: 0;
}
.tabContents .tabContents{background: #3A6E8E;}
.tabContents .tabSelected{background: #3A6E8E;}
.tabContents .tabUnselected{background: #1C2C3C;}
.tabContents .tab:hover{background: #1C2C3C;}
/*}}}*/
/***
!Message area styles /% ============================================================= %/
***/
/*{{{*/
#messageArea {background-color: #1C2C3C; color: #FCF880; border: 2px solid #3A6E8E;}
#messageArea a:link, #messageArea a:visited {color: #FFFFFF; text-decoration:none;}
#messageArea a:hover {color: #B4C14B;}
#messageArea a:active {color: #FCF880;}
#messageArea .messageToolbar a{
border: 1px solid #3A6E8E;
background: #1C2C3C;
}
/*}}}*/
/***
!Popup styles /% ============================================================= %/
***/
/*{{{*/
.popup {color: #fff; background-color: #3A6E8E; border: 1px solid #FFFFFF;}
.popup li.disabled{color: #fff;}
.popup a {color: #3A6E8E; }
.popup a:hover { background: transparent; color: #ff7f00; border: 0;}
.popup hr {color: #FFFFFF; background: #FFFFFF;}
/*}}}*/
/***
!Tiddler Display styles /% ============================================================= %/
***/
/*{{{*/
.title{color: #ffffff;}
h1, h2, h3, h4, h5 {
color: #fff;
background-color: transparent;
border-bottom: 1px solid #3A6E8E;
}
.subtitle{
color: #AAAAAA;
}
.viewer {color: #fff; }
.viewer table{background: #3A6E8E; color: #fff;}
.viewer th {background-color: #996; color: #fff;}
.viewer pre, .viewer code {color: #ddd; background-color: #3A6E8E; border: 1 pxl solid #3A6E8E; }
.viewer hr {color: #FFFFFF;}
.tiddler .button {color: #4C4C4C;}
.tiddler .button:hover { color: #FFFFFF; background-color: #1C2C3C;}
.tiddler .button:active {color: #FFFFFF; background-color: #4c4c4c;}
.toolbar {
color: #FFFFFF;
}
.toolbar a.button,
.toolbar a.button:hover,
.toolbar a.button:active,
.editorFooter a{
border: 0;
}
.toolbar a.button:active {
color: #FFFFFF;
}
.toolbar a.button:hover {
color: #FFFFFF;
}
.footer {
color: #ddd;
}
.selected .footer {
color: #888;
}
.highlight, .marked {
color: #FCF880;
background-color: #1C2C3C;
}
.editorFooter {
color: #aaa;
}
.tab{
-moz-border-radius-topleft: 3px;
-moz-border-radius-topright: 3px;
}
.tagging,
.tagged{
background: #3A6E8E;
border: 1px solid #3A6E8E;
}
.selected .tagging,
.selected .tagged{
background-color: #3A6E8E;
border: 1px solid #FFFFFF;
}
.tagging .listTitle,
.tagged .listTitle{
color: #fff;
}
.tagging .button,
.tagged .button{
color: #FFFFFF;
border: 0;
padding: 0;
}
.tagging .button:hover,
.tagged .button:hover{
background: transparent;
}
.selected .isTag .tagging.simple,
.selected .tagged.simple,
.isTag .tagging.simple,
.tagged.simple {
float: none;
display: inline;
border: 0;
background: transparent;
color: #fff;
margin: 0;
}
.cascade {
background: #1C2C3C;
color: #ddd;
border: 1px solid #3A6E8E;
}
/*}}}*/
Since 2013.1, the environment variable [[UNITY_PROJECT_ROOT]] is no longer required for building or deploying the Integration. However, in this document, we still use this wikiword to represent a target Unity project folder.
Prior to 2013.1, the environment variable [[UNITY_PROJECT_ROOT]] is set and points to your Unity project folder, if you wish to use the post-build deployment script provided by us.
Files in Assets folder with user-defined file extensions, such as *.wem, *.bnk.
<!--{{{-->
<div class='toolbar' macro='toolbar -closeTiddler closeOthers +editTiddler publishTiddler permalink references jump'></div>
<div class='title' macro='view title'></div>
<div class='subtitle'><span macro='view modifier link'></span>, <span macro='view modified date [[DD MMM YYYY]]'></span> (<span macro='message views.wikified.createdPrompt'></span> <span macro='view created date [[DD MMM YYYY]]'></span>)</div>
<div class='viewer' macro='view text wikified'></div>
<div class='tagged' macro='tags'></div>
<div class='tagClear'></div>
<!--}}}-->
A supported architecture name for a multi-architecture platform. Certain platforms such as Windows, Metro, and Android have plugin versions for more than one architecture. They are stored in their own separated sub-folders under the YourPlatform parent folder.
This document uses YourConfiguration to represent one of the supported build configurations: ''Debug'', ''Profile'', and ''Release''.
This document use YourPlatform to represent one of the supported platform name or corresponding folder name, e.g., Windows, iOS, etc.