Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

how can I create children by WAAPI with .net framework 4.5.2 ?

0 votes
I already learned how to create a folder like this, but I want to create an event as the folder's children, which codes can I use?

mycode:
        public static void CallCreatEvent(IWampRealmProxy realmProxy)
        {
            Console.WriteLine("Calling 'ak.wwise.core.create'");

            IDictionary<string, object> jsonArgsDictionary = new Dictionary<string, object>
            {
                {"parent", "\\Events\\Default Work Unit"},
                {"type", "Folder" },
                { "name", "newGun" },
                {"onNameConflict", "rename" },
                //{"children",
                //    {"type", "Event" },
                //    { "name", "newGunShoots" },
                //    {"onNameConflict", "rename" },
                //}
            };
            realmProxy.RpcCatalog.Invoke(
                new CreatCallBack(),
                new CallOptions(),
                "ak.wwise.core.object.create",
                new object[]{ }
                , jsonArgsDictionary
                );
        }
asked Dec 31, 2019 in Feature Requests by 君佑 (100 points)
reopened Jan 6, 2020 by 君佑

1 Answer

0 votes

I would suggest you use the new WAAPI C# client. It will make the code much easier.

Details here: https://www.audiokinetic.com/library/edge/?source=SDK&id=wamp_cs.html

For example:

// Create an object for our tests, using C# anonymous types
var testObj = await client.Call(
    ak.wwise.core.@object.create,
    new
    {
      name = "WaapiObject",
      parent = @"\Actor-Mixer Hierarchy\Default Work Unit",
      type = "ActorMixer",
      onNameConflict = "rename"
    }, null);
answered Jan 9, 2020 by Bernard R. (Audiokinetic) (35,090 points)
Thanks a lot!
The manual of 2019 version has a greatful upgrade from the 2018, it's became more useful.
...