OSCReceiverComponent not executing callback 1st time after Domain Reload
Using Unity 2022.3 (or later, but issue seems not related to Unity version):
There seems to be an issue in the OSCReceiverComponent.
I have a scene with an OSCReceiverComponent and an attached callback.
In Project Settings "Enter Play Mode Options", "Reload Domain" and "Reload Scene" is disabled.
Normally, when I enter play mode and the OSCReceiverComponent receives a correspoding message it triggers the CB.
This works until I change a file and scripts are reloaded and the Domain is reloaded.
The first time I enter the playmode, the callback is not fired.
All following "stop playmode/enter playmode" will correctly fire the callback.
I tracked this down to the OSCReceiverComponent.cs
private OSCEventMessage _callback;
This field is serialized on Domain Reload by Unity. Once I change it to:
[field:NonSerialized]
private OSCEventMessage _callback;
it works correctly even the first time I enter playmode after Domain Reload. Maybe you can reproduce/verify this?
Hello, unfortunately extOSC does not support Domain Reload. I am currently working on a completely new version of extOSC, I will definitely try to resolve this issue in that version, but unfortunately I cannot change this in the current version yet. If there is someone who can fix it, I will gladly accept the pull request.