-
Notifications
You must be signed in to change notification settings - Fork 27
Description
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?