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.

【Waapi】How can i create an object for "audioSource:maxRadiusAttenuation" as a result?

0 votes

【Waapi】How can i create an object for "audioSource:maxRadiusAttenuation" as a result?  I use waapi in Unity&C#,and use this API :JsonUtility.ToJson()&JsonUtility.FromJson。Due to the symbol:":" between audioSource and maxRadiusAttenuation, I can not define a class named "audioSource:maxRadiusAttenuation"!!

or how can i return the result like "audioSource:maxRadiusAttenuation"?

asked May 24, 2020 in General Discussion by chenggongzhang (1,120 points)

1 Answer

0 votes
 
Best answer
We are currently working a WAAPI update that will provide new names with no ":". However we did not decided when this fix will be available.

For the time being, I suggest you do take the string results, and before you pass it to ToJson(), do a String.Replace("audioSource:maxRadiusAttenuation", "maxRadiusAttenuation"), then the ToJson will work, and you will be able to access field "maxRadiusAttenuation" (new name).
answered May 26, 2020 by Bernard R. (Audiokinetic) (35,090 points)
selected May 26, 2020 by chenggongzhang
Thanks very much!!You solved my problem perfectly!Hahaha!!And now i can also use Newtonsoft to solve this problem.And i am looking foward to this fix.
...