I have a project that uses the Datasmith Direct Link and it works perfectly when running as Preview in the editor. But as soon as I build a standalone application the Direct Link won’t work.
The Direct Link Proxy initializes but when I try to list possible sources it returns empty.
I also have a similar problem:
The docu states that to get the direct link to work in a packaged build one has to call it from the command line with the “-messaging” parameter. This works fine.
But does anybody know how if there is a way to build this into my Build?
In the project settings under UDP Messaging there is a setting “Enable by Default” which reads as it should do exactly this, but it does not work.
We’re facing the same difficulty opening a Direct Link connection in a shipping build. However, adding the -messaging parameter does not work for us. Have you done anything additionally to get it to work?
Yes, we’ve also tried that setting, but to no avail in shipping build.
A Development build is not a possibility for us unfortunately, but good to know that it should work there!
It will work if you package a project from an engine with source code not from a launcher editor.
Once you get an engine built from source, you should add in the target.cs file of the project
// Enable UDP in shipping (used by DirectLink)
if (BuildEnvironment == TargetBuildEnvironment.Unique)
{
GlobalDefinitions.Add("ALLOW_UDP_MESSAGING_SHIPPING=1"); // bypasses the 'if shipping' of UdpMessagingModule.cpp
GlobalDefinitions.Add("PLATFORM_SUPPORTS_MESSAGEBUS=1"); // required to enable the default MessageBus in MessagingModule.cpp
}
So I now have a shipping build from the source engine and I added the code you profided.
With this code direct link does work when I provide “-messaging” as an additional parameter e.g. with cmd. (It does not work without the code in the source shipping build as mentioned above by Wabo)
Is there a way to get access to messaging without the need to pass it to the exe like this?
No it seems you have to pass the -messaging option to the exe.
If you are building form source you can go and tweak the IsSupportEnabled() function in Engine\Plugins\Messaging\UdpMessaging\Source\UdpMessaging\Private\UdpMessagingModule.cpp
Hey @UE_FlavienP, why do we need a source build engine for it to work in a shipping build? Also, is it possible to make it work for a shipping build from a binary build engine and how?
to avoid having some features with limited usage, the UDP communication, should not be enabled for every single shipped application and is disabled by default
to enable it, you unfortunately have to rebuild some part of the engine.
So you cannot make it work in a shipping build from a binary built of the engin.
Hey @UE_FlavienP , so the binary build I have is not a launcher one, I have built it from source so I technically did rebuild the engine and I also tweaked the IsSupportEnabled() function in UDPMessaging to always return true but it still didn’t work. Any suggestion or explanation as to why this is the case and how I could make it work?