版本

menu_open

ak.wwise.core.object.create


Creates an object of type 'type', as a child of 'parent'.

(Required *)

Supported by

Graphical User Interface, Command-Line Interface.

Arguments

Name Type Description
parent *   The ID (GUID) or path of the parent of the new object.
type * string The type of the new object. Refer to Wwise Objects Reference for possible object types.
name * string The name of the new object.
onNameConflict string The action to take if "parent" already has a child with the same name. Default value is "fail". Refer to 理解名称冲突模式 for more information.
Possible values : "rename", "replace", "fail", "merge"
platform string The ID (GUID) or path of the platform used when setting properties via this command. Not specifying a platform sets the value for all linked platforms.
notes string  
children array A list of child objects to be created.


Arguments Details


parent

description : The ID (GUID) or path of the parent of the new object.
Possibilities, one of the following :

1) type : string
pattern : ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

2) type : string
pattern : ^\

type

type : string
description : The type of the new object. Refer to Wwise Objects Reference for possible object types.

name

type : string
description : The name of the new object.

onNameConflict

type : string
description : The action to take if "parent" already has a child with the same name. Default value is "fail". Refer to 理解名称冲突模式 for more information.
Possible values : "rename", "replace", "fail", "merge"

platform

description : The ID (GUID) or path of the platform used when setting properties via this command. Not specifying a platform sets the value for all linked platforms.
type : string
pattern : ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

notes

type : string

children

type : array
description : A list of child objects to be created.

argsSchema / children / ...

items

type : object

Name Type Description
type * string The type of the new object. Refer to Wwise Objects Reference for possible object types.
name * string The name of the new object.
notes string  
children    



argsSchema / children / items / ...

patternProperties


^@[_a-zA-Z][_a-zA-Z0-9]*$

description : Sets the value of property @propertyName. Refer to Wwise Objects Reference for property names.
Possibilities, one of the following :

1) type : string

2) type : number

3) type : boolean


Result

Name Type Description
id string The ID (GUID) of the newly created Object.
name string The name of the newly created Object.
children array  


Result Details


id

description : The ID (GUID) of the newly created Object.
type : string
pattern : ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

name

type : string
description : The name of the newly created Object.

children

type : array
Possible types : or object

resultSchema / children / ...

id

type : string
pattern : ^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$

resultSchema / children / ...

name

type : string

resultSchema / children / ...

children

Reference : : See Arguments "children"


Examples :

Create a Sound object.

Create a new Sound object called 'Boom' under the specified parent.

Arguments:

{
    "parent": "{7A12D08F-B0D9-4403-9EFA-2E6338C197C1}", 
    "type": "Sound", 
    "name": "Boom"
}

Result:

{
    "id": "{66666666-7777-8888-9999-AAAAAAAAAAAA}", 
    "name": "Boom"
}

Create a virtual folder.

Create a new virtual folder called 'Guns' under the default work unit. If a folder with the same name already exists, it will automatically find a unique name.

Arguments:

{
    "parent": "\\Actor-Mixer Hierarchy\\Default Work Unit", 
    "type": "Folder", 
    "name": "Guns", 
    "onNameConflict": "rename"
}

Result:

{
    "id": "{66666666-7777-8888-9999-AAAAAAAAAAAA}", 
    "name": "Guns"
}

Create a Play Event on a Sound

Create an event called 'Play_SFX' under the virtual folder 'WAAPI', with Play action on the SFX sound object.

Arguments:

{
    "parent": "\\Events\\Default Work Unit", 
    "type": "Folder", 
    "name": "WAAPI", 
    "onNameConflict": "merge", 
    "children": [
        {
            "type": "Event", 
            "name": "Play_SFX", 
            "children": [
                {
                    "name": "", 
                    "type": "Action", 
                    "@ActionType": 1, 
                    "@Target": "\\Actor-Mixer Hierarchy\\Default Work Unit\\SFX"
                }
            ]
        }
    ]
}

Result:

{
    "id": "{6114659F-9274-4031-B90E-F369568532E0}", 
    "name": "WAAPI", 
    "children": [
        {
            "id": "{F546017D-201A-49BD-8D4E-0A28F5DBB28D}", 
            "name": "Play_SFX", 
            "children": [
                {
                    "id": "{400D0354-0FDB-48B4-B341-9DFA0B76078D}", 
                    "name": ""
                }
            ]
        }
    ]
}

Create a Random Container with 2 sound objects.

Create a Random Container called 'Boom' under the specified parent, with two Sound objects 'A' and 'B'.

Arguments:

{
    "parent": "{7A12D08F-B0D9-4403-9EFA-2E6338C197C1}", 
    "type": "RandomSequenceContainer", 
    "name": "Boom", 
    "@RandomOrSequence": 1, 
    "children": [
        {
            "type": "Sound", 
            "name": "A"
        }, 
        {
            "type": "Sound", 
            "name": "B"
        }
    ]
}

Result:

{
    "id": "{66666666-7777-8888-9999-AAAAAAAAAAAA}", 
    "name": "Boom", 
    "children": [
        {
            "id": "{46813545-2168-3547-8328-681AB678D6F5}", 
            "name": "A"
        }, 
        {
            "id": "{68465134-2548-2377-3541-321354318ASD}", 
            "name": "B"
        }
    ]
}


Detailed JSON Schema


Arguments :

{
    "type": "object", 
    "properties": {
        "parent": {
            "description": "The ID (GUID) or path of the parent of the new object.", 
            "anyOf": [
                {
                    "type": "string", 
                    "pattern": *Must be a valid GUID*
                }, 
                {
                    "type": "string", 
                    "pattern": "^\\\\"
                }
            ]
        }, 
        "type": {
            "type": "string", 
            "description": "The type of the new object."
        }, 
        "name": {
            "type": "string", 
            "description": "The name of the new object."
        }, 
        "onNameConflict": {
            "type": "string", 
            "description": "The action to take if \"parent\" already has a child with the same name. Default value is \"fail\".", 
            "enum": [
                "rename", 
                "replace", 
                "fail", 
                "merge"
            ]
        }, 
        "platform": {
            "description": "The ID (GUID) or path of the platform used when setting properties via this command. Not specifying a platform sets the value for all linked platforms.", 
            "type": "string", 
            "pattern": *Must be a valid GUID*
        }, 
        "notes": {
            "type": "string"
        }, 
        "children": {
            "type": "array", 
            "description": "A list of child objects to be created.", 
            "items": {
                "type": "object", 
                "properties": {
                    "type": {
                        "type": "string", 
                        "description": "The type of the new object."
                    }, 
                    "name": {
                        "type": "string", 
                        "description": "The name of the new object."
                    }, 
                    "notes": {
                        "type": "string"
                    }, 
                    "children": {
                        "$ref": "#/properties/children"
                    }
                }, 
                "patternProperties": {
                    "^@[_a-zA-Z][_a-zA-Z0-9]*$": {
                        "description": "Sets the value of property \\@propertyName.", 
                        "anyOf": [
                            {
                                "type": "string"
                            }, 
                            {
                                "type": "number"
                            }, 
                            {
                                "type": "boolean"
                            }
                        ]
                    }
                }, 
                "required": [
                    "type", 
                    "name"
                ], 
                "additionalProperties": false
            }
        }
    }, 
    "patternProperties": {
        "^@[_a-zA-Z][_a-zA-Z0-9]*$": {
            "description": "Sets the value of property \\@propertyName.", 
            "anyOf": [
                {
                    "type": "string"
                }, 
                {
                    "type": "number"
                }, 
                {
                    "type": "boolean"
                }
            ]
        }
    }, 
    "required": [
        "type", 
        "name", 
        "parent"
    ], 
    "additionalProperties": false
}


Options :

{
    "type": "object", 
    "required": [], 
    "properties": {}, 
    "additionalProperties": false
}


Response :

{
    "type": "object", 
    "properties": {
        "id": {
            "description": "The ID (GUID) of the newly created Object.", 
            "type": "string", 
            "pattern": *Must be a valid GUID*
        }, 
        "name": {
            "type": "string", 
            "description": "The name of the newly created Object."
        }, 
        "children": {
            "type": "array", 
            "items": [
                {
                    "type": "object", 
                    "properties": {
                        "id": {
                            "type": "string", 
                            "pattern": *Must be a valid GUID*
                        }, 
                        "name": {
                            "type": "string"
                        }, 
                        "children": {
                            "$ref": "#/properties/children"
                        }
                    }
                }
            ]
        }
    }
}

Document version : 1


此页面对您是否有帮助?

需要技术支持?

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

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

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

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

开始 Wwise 之旅