//TODO: Check Callback results come in correctly /// <summary> /// Creates the specified node in Wwsise /// </summary> /// <param name="parent">The GUID or path of the parent to the new object.</param> /// <param name="type">The type of the new object. See Wwise Objects Reference at audiokinetic.com</param> /// <param name="name">The name of the new object.</param> /// <param name="onNameConflict">The action to take on a name conflict.</param> /// <param name="platform">The GUID or path of the platform to use. Default uses all linked platforms.</param> /// <param name="notes">Notes to add to the object.</param> /// <param name="children">A list of child objects to be created below the new object.</param> /// <returns></returns> public static Dictionary <string, object> Create(string parent, string type, string name, WwiseValues.OnNameConflict onNameConflict = WwiseValues.OnNameConflict.fail, string platform = null, string notes = null, string[] children = null) { if (packet.results != null) { packet.results.Clear(); } packet.keywordArguments.Add("parent", parent); packet.keywordArguments.Add("type", type); packet.keywordArguments.Add("name", name); packet.keywordArguments.Add("onNameConflict", onNameConflict.ToString()); if (platform != null) { packet.keywordArguments.Add("platform", platform); } if (notes != null) { packet.keywordArguments.Add("notes", notes); } if (children != null) { packet.keywordArguments.Add("children", children); } packet.procedure = "ak.wwise.core.object.create"; packet.callback = new Callback(packet); results = connection.Execute(packet); packet.Clear(); return((Dictionary <string, object>)results); }
/// <summary> /// Copies the specified node beneath the specified parent node. /// </summary> /// <param name="node">The node GUID.</param> /// <param name="parent">The parent GUID.</param> /// <param name="onNameConflict">What action to take on naming conflict.</param> /// <returns>Returns information on the moved node.</returns> public static Dictionary <string, object> Copy(string node, string parent, WwiseValues.OnNameConflict onNameConflict = WwiseValues.OnNameConflict.fail) { if (packet.results != null) { packet.results.Clear(); } packet.keywordArguments.Add("object", node); packet.keywordArguments.Add("parent", parent); if (onNameConflict != WwiseValues.OnNameConflict.fail) { packet.keywordArguments.Add("onNameConflict", onNameConflict.ToString()); } packet.procedure = "ak.wwise.core.object.copy"; packet.callback = new Callback(packet); results = connection.Execute(packet); packet.Clear(); return((Dictionary <string, object>)results); }