Creates a new Sound object, imports a WAV file into it, and then creates an Event with a Play action on the Sound.
Function URI
ak.wwise.core.object.set
Arguments
{
"objects": [
{
"object": "\\Actor-Mixer Hierarchy\\Import",
"children": [
{
"type": "Sound",
"name": "MySound",
"import": {
"files": [
{
"audioFile": "C:\\MySound.wav",
"originalsSubFolder": "SUB"
}
]
}
}
]
},
{
"object": "\\Events\\Default Work Unit",
"onNameConflict": "merge",
"children": [
{
"type": "Event",
"name": "Play_MySound",
"children": [
{
"name": "",
"type": "Action",
"@ActionType": 1,
"@Target": "\\Actor-Mixer Hierarchy\\Import\\MySound"
}
]
}
]
}
],
"onNameConflict": "merge",
"listMode": "replaceAll"
}
Options
Result
{
"objects": [
{
"children": [
{
"id": "{4314DDF5-F4EB-477B-A414-DB724A3FC0CC}",
"import": {
"logs": [
{
"message": "Finalizing Importation...",
"severity": "Message"
}
],
"objects": [
{
"id": "{F72DD400-91D1-4305-B14E-31113A28FF1C}",
"name": "MySound"
}
]
},
"name": "MySound"
}
],
"id": "{64EE1D88-F322-4BD8-AA18-21852859CBCF}",
"name": "Import"
},
{
"children": [
{
"children": [
{
"id": "{8A8A7BC0-C62B-4986-BCCF-F98EFB92A697}",
"name": ""
}
],
"id": "{CAA381F1-A9C7-4846-AAFB-696C1C9F00F5}",
"name": "Play_MySound"
}
],
"id": "{C1F6AE1D-03CF-448A-8DE9-EE25FC6F459C}",
"name": "Default Work Unit"
}
]
}
Refer to Using the Wwise Authoring API (WAAPI) for more information about Wwise Authoring API.