Hi, I’m trying to receive OSC messages in Unreal, but the packets don’t seem to appear in Unreal. What am I missing?
This is my base setup for creating the server, and handling messages
I originally had the IP address empty same result.
I’m sending OSC from the same PC from TouchDesigner sending to localhost port 7000, with the following setup.
Touch designer can receive the messages either from TD or from an external device, however the packets don’t show up in unreal. I see nothing on my log but that the listener started successfully.
LogOnline: OSS: Creating online subsystem instance for: :Context_6
LogBlueprintUserMessages: [BP_OSC_Interface_2] Hello
LogOSC: Display: OSCServer 'Unreal' Listening: 127.0.0.1:7000.
PIE: Server logged in
Update:
After a bit of fiddling around and a couple restarts, it seems like Unreal is getting the messages, I reached this part of the code, and it prints the verbose messages of every incoming OSC message. OSCServer.cpp
void UOSCServer::DispatchMessage(const FString& InIPAddress, uint16 InPort, const FOSCMessage& InMessage)
{
OnOscMessageReceived.Broadcast(InMessage, InIPAddress, InPort);
OnOscMessageReceivedNative.Broadcast(InMessage, InIPAddress, InPort);
UE_LOG(LogOSC, Verbose, TEXT("Message received from endpoint '%s', OSCAddress of '%s'."), *InIPAddress, *InMessage.GetAddress().GetFullPath());
LogOSC: Verbose: Message received from endpoint '192.168.201.196', OSCAddress of '/td/val'.
LogOSC: Verbose: Message received from endpoint '192.168.201.196', OSCAddress of '/td/val'.
LogOSC: Verbose: Message received from endpoint '192.168.201.196', OSCAddress of '/td/val'.
LogOSC: Verbose: Message received from endpoint '192.168.201.196', OSCAddress of '/td/val'.
So now the only question remaining is why aren’t the bound events called on broadcast?
Solution
After manually binding the on OSC Message received event it gets the OSC messages