CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 17
Waapi GDNative interface
Return value | Signature |
---|---|
bool | connect_client(String uri, unsigned int port) |
bool | is_client_connected() |
void | disconnect_client() |
Dictionary | subscribe(String uri, String options) |
Dictionary | subscribe_with_timeout(String uri, String options, int timeoutMs) |
Dictionary | unsubscribe(int subscriptionId) |
Dictionary | unsubscribe_with_timeout(int subscriptionId, int timeoutMs) |
Dictionary | client_call(String uri, String args, String options) |
Dictionary | client_call_with_timeout(String uri, String args, String options, int timeoutMs) |
String | get_last_string() |
Connects the Waapi client at the given uri
and port
. The Wwise authoring application should be open and available at the given location and port in order for this call to succeed. Example:
var connectResult = Waapi.connect_client("127.0.0.1", 8080)
if connectResult:
# Do something...
Returns true
if connection succeeded.
Checks the connection status of the Waapi client.
Returns true
if the client is connected, false
otherwise.
Disconnects the Waapi client from the current Wwise authoring session.
Subscribes the Waapi client to changes to e.g. the Wwise project in the authoring app.
In order to get the data
dictionary with keys subscriptionID
and jsonString
, the signal wamp_event
should be connected in GDScripts, e.g.
Waapi.connect("wamp_event", self, "_on_wamp_event")
func _on_wamp_event(data):
print(data)
Returns a Dictionary with keys subscriptionId
, subscribeResult
and resultString
Subscribes the Waapi client to changes to e.g. the Wwise project in the authoring app and returns after some timeout in milliseconds has passed. Works similarly to subscribe but adding a timeout.
Returns a Dictionary with keys subscriptionId
, subscribeResult
and resultString
Unsubscribes the Waapi client to changes to e.g. the Wwise project in the authoring app, given a subscription ID.
Returns a Dictionary with keys unsubscribeResult
, resultString
Unsubscribes the Waapi client to changes to e.g. the Wwise project in the authoring app with a timeout in milliseconds. Works similarly to unsubscribe but adding a timeout.
Returns a Dictionary with keys unsubscribeResult
, resultString
Calls the Waapi with a given uri
, arguments and options. Example of usage:
var connectResult = Waapi.connect_client("127.0.0.1", 8080)
if connectResult:
var args = {"from": {"ofType": ["Project", "Bus", "Switch", "State", "Event", "SoundBank"]}}
var options = {"return": ["name", "type", "workunit", "path", "shortId"]}
var clientCallDict = Waapi.client_call("ak.wwise.core.object.get", JSON.print(args), JSON.print(options))
var jsonProjectDocument = JSON.parse(clientCallDict["resultString"])
if jsonProjectDocument.error == OK and jsonProjectDocument.result.has("return"):
print(jsonProjectDocument.result["return"])
if Waapi.is_client_connected():
Waapi.disconnect_client()
Returns a Dictionary with keys callResult
, resultString
Calls the Waapi with a given uri
, arguments and options, specifying a time out in milliseconds.
Returns a Dictionary with keys callResult
, resultString
Gets the last string result from subscribe
, unsubscribe
or call
. Useful for debugging.
Returns a result
String
- 2024.1 / 4.3, 4.4, 4.5
- 2023.1 / 4.1+
- 3.5
- Getting Started
- Tutorials
- Exporting projects
- GDNative Interfaces
- Custom Nodes
- Custom addons
- Wwise version upgrade
- Roadmap