Closed sergiobd closed 4 years ago
Is it is not possible to raise such an event from a data receiving callback?
No, it's not possible. Please check "OSC server class" section in README.
Note that the delegates are to be called in the server thread; You have to queue the events for processing them in the main thread (this will be required in most cases of Unity).
Hi Keijiro,
I tried to raise an UnityEvent inside an OscJack receiving callback. In short:
I'm doing this on start:
server.MessageDispatcher.AddCallback(address, GetData);
This is the GetData callback:
where receiveEvent is:
[System.Serializable] public class UnityFloatEvent : UnityEvent<float, Vector3> { }
However, I get this error when the callback is called:
UnityEngine.UnityException: get_isPlaying can only be called from the main thread.
Is it is not possible to raise such an event from a data receiving callback?