I'd like to ensure that the value we just tried to set with SetSwitch exists. I assumed I could do this with a call to GetSwitch after the SetSwitch call. We compare the target value we tried to set with the value returned from the GetSwitch call to ensure that they're the same.
However, I find that when calling AK::SoundEngine::Query::GetSwitch the returned switch state "out_rSwitchState" is assigned a value of 0.
The documentation for SetSwitch states that it always returns success (regardless of whether the switch value exists in the project) so its return value is of no use to me.
Sets the State of a Switch Group (by IDs).
Returns
Always returns AK_Success
When passed a switch state that doesn't exist (invalid hash/unrecognised string) the SetSwitch silently fails and the switch group is assigned the default switch group value.
I haven't seen anything in the documentation to suggest that making a GetSwitch call straight after a SetSwitch call is invalid so... what's going on here?