LiveLinkPublishingPort

LiveLinkPublishingPort

#Overview

name: LiveLinkPublishingPort

The value of this variable can be defined or overridden in .ini config files. 1 .ini config file referencing this setting variable.

It is referenced in 4 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of LiveLinkPublishingPort is to specify the network port used for publishing LiveLink face blend shapes data in Apple’s ARKit implementation for Unreal Engine 5. This setting is primarily used in the context of AR (Augmented Reality) and face tracking features.

This setting variable is relied upon by the AppleARKit plugin, specifically within the AppleARKitFaceSupport module. It’s part of the AR system in Unreal Engine, focusing on Apple’s ARKit implementation.

The value of this variable is set in the UAppleARKitSettings class constructor with a default value of 11111. It can be modified through the engine’s configuration system or potentially through Blueprint or C++ code that interacts with the UAppleARKitSettings object.

LiveLinkPublishingPort interacts with other AR-related settings, such as bEnableLiveLinkForFaceTracking, which determines whether LiveLink for face tracking is enabled.

Developers must be aware that this port number needs to be available and not conflicting with other network services on the device. It’s also important to ensure that firewalls or network configurations allow traffic on this port if face tracking data needs to be transmitted across a network.

Best practices when using this variable include:

  1. Ensuring the chosen port number doesn’t conflict with other services.
  2. Considering security implications of opening this port, especially in production environments.
  3. Documenting the chosen port number for team members who might need to interact with the face tracking data.
  4. Potentially making this configurable at runtime for flexibility in different deployment scenarios.
  5. Testing the face tracking feature across different network conditions to ensure reliable data transmission.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/BaseEngine.ini:3421, section: [/Script/AppleARKit.AppleARKitSettings]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Plugins/Runtime/AR/AppleAR/AppleARKit/Source/AppleARKit/Private/AppleARKitSystem.cpp:2875

Scope (from outer to inner):

file
function     int32 UAppleARKitSettings::GetLiveLinkPublishingPort

Source code excerpt:

{
	FScopeLock ScopeLock(&CriticalSection);
	return LiveLinkPublishingPort;
}

FName UAppleARKitSettings::GetFaceTrackingLiveLinkSubjectName()
{
	FScopeLock ScopeLock(&CriticalSection);
	return DefaultFaceTrackingLiveLinkSubjectName;

#Loc: <Workspace>/Engine/Plugins/Runtime/AR/AppleAR/AppleARKit/Source/AppleARKit/Public/AppleARKitSettings.h:48

Scope (from outer to inner):

file
class        class UAppleARKitSettings : public UObject, public FSelfRegisteringExec
function     UAppleARKitSettings

Source code excerpt:

		, WrittenCameraImageScale(1.f)
		, WrittenCameraImageQuality(85)
		, LiveLinkPublishingPort(11111)
		, DefaultFaceTrackingLiveLinkSubjectName(FName("iPhoneXFaceAR"))
		, DefaultPoseTrackingLiveLinkSubjectName(FName("PoseTracking"))
		, DefaultFaceTrackingDirection(EARFaceTrackingDirection::FaceRelative)
		, bAdjustThreadPrioritiesDuringARSession(false)
		, GameThreadPriorityOverride(47)
		, RenderThreadPriorityOverride(45)

#Loc: <Workspace>/Engine/Plugins/Runtime/AR/AppleAR/AppleARKit/Source/AppleARKit/Public/AppleARKitSettings.h:129

Scope (from outer to inner):

file
class        class UAppleARKitSettings : public UObject, public FSelfRegisteringExec

Source code excerpt:

	/** The port to use when listening/sending LiveLink face blend shapes via the network */
	UPROPERTY(Config, BlueprintReadOnly, EditAnywhere, Category="AR Settings")
	int32 LiveLinkPublishingPort;
	
	/**
	 * The default name to use when publishing face tracking name
	 * If multiple faces are tracked, the subject name for the faces will be:
	 * #1: DefaultFaceTrackingLiveLinkSubjectName
	 * #2: DefaultFaceTrackingLiveLinkSubjectName-1

#Loc: <Workspace>/Engine/Plugins/Runtime/AR/AppleAR/AppleARKitFaceSupport/Source/AppleARKitFaceSupport/Private/AppleARKitFaceSupportModule.cpp:44

Scope (from outer to inner):

file
function     void FAppleARKitFaceSupportModule::OnModularFeatureAvailable

Source code excerpt:

		FAppleARKitLiveLinkConnectionSettings Settings;
		GConfig->GetBool(TEXT("/Script/AppleARKit.AppleARKitSettings"), TEXT("bEnableLiveLinkForFaceTracking"), bEnableLiveLinkForFaceTracking, GEngineIni);
		GConfig->GetInt(TEXT("/Script/AppleARKit.AppleARKitSettings"), TEXT("LiveLinkPublishingPort"), Settings.Port, GEngineIni);

		if (bEnableLiveLinkForFaceTracking || FParse::Param(FCommandLine::Get(), TEXT("EnableLiveLinkFaceTracking")))
		{
			LiveLinkSource = FAppleARKitLiveLinkSourceFactory::CreateLiveLinkSource(Settings);
		}
	}