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.

+1 vote

Hello there,
When using an object Reference in effect plugins, how do we get the AkUniqueID of the object when it gets set in the authoring tool? AK::IAkPluginParam::SetParam isn't called when these are modified unlike other Properties. I've implemented NotifyPropertyChanged on my plugin, and it is being called with the reference's property name, but querying m_propertySet.GetValueUInt32 with the reference parameter name returns false. I'm surprised NotifyPropertyChanged doesn't give a property value.

Should I be querying the waapi for the property value and implementing the AK::Wwise::Plugin::CustomData to handle serialization?

in General Discussion by Sheri B. (290 points)

1 Answer

0 votes
 
Best answer
References are unlike regular properties: they are an Authoring-only concept: this is why SetParam does not get called.
Note that plug-ins seldom require references to implement their behavior, and so the plug-in API provides no special facility for them.

Getting the ShortID cannot be done directly through the plug-in API: references are not properties and so cannot be queried through the m_propertySet.

Using a WAAPI query will allow you to retrieve the AkUniqueID. The synchronization with the Authoring for cases when the referenced object is deleted however is harder to achieve (there is no publish-subscribe in the plug-in API at the moment).
Nevertheless, you can save this value to a AK::Wwise::Plugin::CustomData for serialization yes, but it could also be saved into the property set as a uint32 once you have obtained the value from WAAPI.
by Samuel L. (Audiokinetic) (23.6k points)
selected by Sheri B.
...