UdonSharp compiler doesn't export SDK proxied event methods unless they're referenced externally, breaking event delivery (e.g. `OnAudioFilterRead`)
Haxy
SDK Version: 3.10.3
When a
UdonSharpBehaviour
contains an SDK-proxied event method (such as public void OnAudioFilterRead
) that isn't referenced externally elsewhere in the program, the UdonSharp compiler fails to export the symbol under the expected proxied event name. The entry point ends up exported as something like __0_OnAudioFilterRead
(the internal/mangled name) instead of _onAudioFilterRead
.This causes the entry-point check inside
UdonBehaviour
to fail, so the event proxy is never registered and the user's method silently never fires.Reference code path on the SDK side:
if (_program.EntryPoints.HasExportedSymbol("_onAudioFilterRead"))
{
RegisterEventProxy<OnAudioFilterReadProxy>();
}
Because
HasExportedSymbol("_onAudioFilterRead")
returns false, RegisterEventProxy<OnAudioFilterReadProxy>()
is never called and the proxied event is never delivered.Steps to reproduce:
- Create a UdonSharpBehaviourwithpublic void OnAudioFilterRead(float[] data, int channels).
- Don't reference the method from any other script, UI event, or SendCustomEventcall.
- Enter Play mode with an audio source that should drive the filter.
- Observe that OnAudioFilterReadis never invoked.
- Inspect the compiled program's exported symbols — the entry point is __0_OnAudioFilterReadinstead of_onAudioFilterRead.
Note:
OnAudioFilterRead is also not available in udongraph
Photo Viewer
View photos in a modal
Log In