Version
Wwise Unity Integration Documentation
|
This class wraps the client that communicates with the Wwise Authoring application via WAAPI. Given that only one request can be pending on the websocket, a queue is used to consume all calls sequentially. Messages sent to WAAPI use the JSON format and are serialized by Unity Json serialization. Helper classes (WaapiHelper) for serialization, keywords for WAAPI commands (WaapiKeywords), and classes for serializing message arguments and deserializing responses are found in AkWaapiHelper.cs. Uri.cs contains classes with fields containing URI strings for WAAPI calls and error messages. More...
Classes | |
class | SubscriptionInfo |
Class used to store information about a specific subscription. More... | |
struct | WaapiCommand |
A simple structure containing an async payload function that will be executed when it is consumed by the command queue. More... | |
Public Member Functions | |
delegate void | GetResultListDelegate< T > (List< T > result) |
Generic delegate function for callbacks that expect to receive a list of objects in response to a WAAPI request. More... | |
delegate void | GetResultDelegate< T > (T result) |
Generic delegate function for callbacks that expect to receive a single object in response to a WAAPI request. More... | |
Static Public Member Functions | |||||
static bool | IsConnected () | ||||
Check whether the client is currently connected. More... | |||||
static void | Disconnected () | ||||
Invoked after the client has disconnected from Wwise authoring. More... | |||||
static string | GetStatusString () | ||||
Returns a rich text string representing the current WAAPI connection status. More... | |||||
static void | QueueCommand (string uri, string args, string options) | ||||
Use this function to queue a command with no expected return object. More... | |||||
static void | QueueCommandWithReturnType< T > (string uri, GetResultDelegate< T > callback, string args=null, string options=null) | ||||
Use this function to enqueue a command with an expected return object of type T. The command will deserialize the respone as type T and pass it to the callback. /// More... | |||||
static void | QueueCommandWithReturnWwiseObjects< T > (WaqlArgs args, ReturnOptions options, GetResultListDelegate< T > callback) | ||||
Enqueues a command with a payload that desirializes the list of wwise objects from the response. More... | |||||
static void | GetWwiseObject< T > (System.Guid guid, ReturnOptions options, GetResultListDelegate< T > callback) | ||||
Generic function for fetching a Wwise object with custom return options. More... | |||||
static void | GetWwiseObjects< T > (List< System.Guid > guids, ReturnOptions options, GetResultListDelegate< T > callback) | ||||
Generic function for fetching a list of Wwise objects with custom return options. More... | |||||
static void | GetWwiseObjectAndAncestors< T > (System.Guid guid, ReturnOptions options, GetResultListDelegate< T > callback) | ||||
Enqueues a waapi command to fetch the specified object and all of its ancestors in the hierarchy. Passes the list of WwiseObjectInfo containing the specified object and ancestors to the callback. More... | |||||
static void | GetWwiseObjectAndDescendants< T > (System.Guid guid, ReturnOptions options, int depth, GetResultListDelegate< T > callback) | ||||
Enqueues a waapi comand to fetch the specified object and all of its descendants in the hierarchy to a specified depth. Passes the list of WwiseObjectInfo containing the specified object and descendants to the callback. More... | |||||
static void | GetWwiseObjectAndDescendants< T > (string identifier, ReturnOptions options, int depth, GetResultListDelegate< T > callback) | ||||
Composes a WAQL "from object" request based on the parameters and enqueues a WAAPI command. Passes the list of WwiseObjectInfo containing the results to the callback More... | |||||
static void | Search< T > (string searchString, WwiseObjectType objectType, ReturnOptions options, GetResultListDelegate< T > callback) | ||||
Composes a WAQL "search" request based on the parameters and enqueues a WAAPI command. Passes the list of WwiseObjectInfo containing the search results to the callback More... | |||||
static void | GetChildren< T > (System.Guid guid, ReturnOptions options, GetResultListDelegate< T > callback) | ||||
Get the children of a given object. More... | |||||
static void | GetProject< T > (GetResultListDelegate< T > callback, ReturnOptions options) | ||||
Get the WwiseObjectInfo for the project. More... | |||||
static List< WwiseObjectInfo > | ParseObjectInfo (List< WwiseObjectInfoJsonObject > returnObjects) | ||||
Parse the response WwiseObjectInfoJsonObject of a "from object" request and implicit cast the objects to WwiseObjectInfo. More... | |||||
static void | SelectObjectInAuthoring (System.Guid guid) | ||||
Select the object in Wwise Authoring. Creates a WaapiCommand object containing a lambda call to SelectObjectInAuthoringAsync and adds it to the waapiCommandQueue. More... | |||||
static void | OpenWorkUnitInExplorer (System.Guid guid) | ||||
Open the OS file browser to the folder containing this object's Work Unit. Creates a WaapiCommand object containing a lambda call to OpenWorkUnitInExplorerAsync and adds it to the waapiCommandQueue. More... | |||||
static void | OpenSoundBankInExplorer (System.Guid guid) | ||||
Open the OS file browser to the folder containing the generated SoundBank. Creates a WaapiCommand object containing a lambda call to OpenSoundBankInExplorer and adds it to the waapiCommandQueue. More... | |||||
static void | Rename (System.Guid guid, string newName) | ||||
Rename an object in Wwise authoring. Creates a WaapiCommand object containing a lambda call to RenameAsync and adds it to the waapiCommandQueue. More... | |||||
static void | Delete (System.Guid guid) | ||||
Delete an object in wwise authoring. Work Units cannot be deleted in this manner. Creates a WaapiCommand object containing a lambda call to DeleteAsync and adds it to the waapiCommandQueue. More... | |||||
static bool | IsPlayable (WwiseObjectType type) | ||||
Checks if Wwise object is playable. More... | |||||
static void | TogglePlayEvent (WwiseObjectType objectType, System.Guid guid) | ||||
Play or pause an object in Wwise authoring. Creates a WaapiCommand object containing a lambda call to TogglePlayEventAsync and adds it to the waapiCommandQueue. /summary>
| |||||
static void | StopAllTransports () | ||||
Stops all playing transports. Creates a WaapiCommand object containing a lambda call to StopAllTransportsAsync and adds it to the waapiCommandQueue. More... | |||||
static void | Subscribe (string topic, Wamp.PublishHandler subscriptionCallback, System.Action< SubscriptionInfo > handshakeCallback) | ||||
Subscribe to WAAPI topic. Refer to WAAPI reference documentation for a list of topics and their options. Creates a WaapiCommand object containing a lambda call to SubscribeAsync and adds it to the waapiCommandQueue. More... | |||||
static void | Unsubscribe (uint id) | ||||
Unsubscribe from an existing subscription. Creates a WaapiCommand object containing a lambda call to UnsubscribeAsync and adds it to the waapiCommandQueue. More... | |||||
static List< WwiseObjectInfo > | ParseSelectedObjects (string json) | ||||
Deserializes the objects published by the ak.wwise.ui.selectionChanged topic. More... | |||||
static WwiseRenameInfo | ParseRenameObject (string json) | ||||
Deserializes the object published by the ak.wwise.core.object.nameChanged topic. More... | |||||
static WwiseChildModifiedInfo | ParseChildAddedOrRemoved (string json) | ||||
Deserializes the object published by the ak.wwise.core.object.childAdded or ak.wwise.core.object.childRemoved topic. More... | |||||
Static Public Attributes | |
static System.Action< bool > | Disconnecting |
Fired when the connection is closing or closed, the bool parameter represents whether the socket connection is still open (for cleaning up subscriptions). More... | |
static System.Action | Connected |
Fired when the connection is established, should be used by external classes to subscribe to topics they are interested in. More... | |
static System.Action | QueueConsumed |
Fired when all commands in the queue have been executed. More... | |
This class wraps the client that communicates with the Wwise Authoring application via WAAPI. Given that only one request can be pending on the websocket, a queue is used to consume all calls sequentially. Messages sent to WAAPI use the JSON format and are serialized by Unity Json serialization. Helper classes (WaapiHelper) for serialization, keywords for WAAPI commands (WaapiKeywords), and classes for serializing message arguments and deserializing responses are found in AkWaapiHelper.cs. Uri.cs contains classes with fields containing URI strings for WAAPI calls and error messages.
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageRegister your project and we'll help you get started with no strings attached!
Get started with Wwise