版本

menu_open
警告:系统已根据您所用大版本 (2023.1.8.8601) 自动跳转至最新文档。若想访问特定版本的文档,请从 Audiokinetic Launcher 下载离线文档,并在 Wwise 设计程序中勾选 Offline Documentation 选项。
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. 更多...

class  SubscriptionInfo
 Class used to store information about a specific subscription. 更多...
 
struct  WaapiCommand
 A simple structure containing an async payload function that will be executed when it is consumed by the command queue. 更多...
 

Public 成员函数

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. 更多...
 
delegate void GetResultDelegate< T > (T result)
 Generic delegate function for callbacks that expect to receive a single object in response to a WAAPI request. 更多...
 

静态 Public 成员函数

static bool IsConnected ()
 Check whether the client is currently connected. 更多...
 
static void Disconnected ()
 Invoked after the client has disconnected from Wwise authoring. 更多...
 
static string GetStatusString ()
 Returns a rich text string representing the current WAAPI connection status. 更多...
 
static void QueueCommand (string uri, string args, string options)
 Use this function to queue a command with no expected return object. 更多...
 
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. /// 更多...
 
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. 更多...
 
static void GetWwiseObject< T > (System.Guid guid, ReturnOptions options, GetResultListDelegate< T > callback)
 Generic function for fetching a Wwise object with custom return options. 更多...
 
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. 更多...
 
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. 更多...
 
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. 更多...
 
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 更多...
 
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 更多...
 
static void GetChildren< T > (System.Guid guid, ReturnOptions options, GetResultListDelegate< T > callback)
 Get the children of a given object. 更多...
 
static void GetProject< T > (GetResultListDelegate< T > callback, ReturnOptions options)
 Get the WwiseObjectInfo for the project. 更多...
 
static List< WwiseObjectInfoParseObjectInfo (List< WwiseObjectInfoJsonObject > returnObjects)
 Parse the response WwiseObjectInfoJsonObject of a "from object" request and implicit cast the objects to WwiseObjectInfo. 更多...
 
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. 更多...
 
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. 更多...
 
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. 更多...
 
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. 更多...
 
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. 更多...
 
static bool IsPlayable (WwiseObjectType type)
 Checks if Wwise object is playable. 更多...
 
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>
参数
objectTypeUsed to check whether the object is playable.
guidGUID of the object to be played.
更多...
 
static void StopAllTransports ()
 Stops all playing transports. Creates a WaapiCommand object containing a lambda call to StopAllTransportsAsync and adds it to the waapiCommandQueue. 更多...
 
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. 更多...
 
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. 更多...
 
static List< WwiseObjectInfoParseSelectedObjects (string json)
 Deserializes the objects published by the ak.wwise.ui.selectionChanged topic. 更多...
 
static WwiseRenameInfo ParseRenameObject (string json)
 Deserializes the object published by the ak.wwise.core.object.nameChanged topic. 更多...
 
static WwiseChildModifiedInfo ParseChildAddedOrRemoved (string json)
 Deserializes the object published by the ak.wwise.core.object.childAdded or ak.wwise.core.object.childRemoved topic. 更多...
 

静态 Public 属性

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). 更多...
 
static System.Action Connected
 Fired when the connection is established, should be used by external classes to subscribe to topics they are interested in. 更多...
 
static System.Action QueueConsumed
 Fired when all commands in the queue have been executed. 更多...
 

详细描述

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.


此页面对您是否有帮助?

需要技术支持?

仍有疑问?或者问题?需要更多信息?欢迎联系我们,我们可以提供帮助!

查看我们的“技术支持”页面

介绍一下自己的项目。我们会竭力为您提供帮助。

来注册自己的项目,我们帮您快速入门,不带任何附加条件!

开始 Wwise 之旅