Building an App with Datasmith Direct Link

Hey,

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.

@WUG-Jonas Hello, Did you find any solution to this?

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.

Hi,

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?

Thanks in advance! :slight_smile:

Hey, I only got it to work with a development build.
The tooltip of the “Enable by default” setting mentions:

In shipping builds, ALLOW_UDP_MESSAGING_SHIPPING=1 must also be defined in TargetRules for messaging to be available with or without this setting.

Which I tried but did not get to work.

Thanks for your reply!

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!

Thanks! :slight_smile:

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

I tried tweaking this function but did not get it to work.
Do you have a suggestion what I would need to change?
Help would be much appreciated!

Have you ever encountered any synchronization problems with 3DSMAX, resulting in the loss of some textures?

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?

As far as I understood:

  1. 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
  2. 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?