WinDualShock plugin does not specify UBA's ExtraRootPath

Hello,

When trying out UBA on 5.6 I noticed that the plugin WinDualShock could benefit from ExtraRootPath but doesn’t. See attached log.

UbaCacheClient - PATH WITHOUT ROOT: c:\\program files (x86)\\sce\\common\\external tools\\libscepad for pc games(dualsense and d (inside C:\dne\monorepo-preview\UE\Engine\Plugins\Runtime\Windows\WinDualShock\Intermediate\Build\Win64\x64\UnrealEditor\Development\WinDualShock\Module.WinDualShock.cpp.dep.json at offset 14753)
UbaCacheClient - PATH WITHOUT ROOT: C:/Program Files (x86)/SCE/Common/External Tools/libScePad for PC Games(DualSense and DUALSH (inside C:\dne\monorepo-preview\UE\Engine\Plugins\Runtime\Windows\WinDualShock\Intermediate\Build\Win64\x64\UnrealEditor\Development\WinDualShock\WinDualShock.Shared.rsp at offset 0)
UbaCacheClient - FILE WITHOUT ROOT: C:\Program Files (x86)\SCE\Common\External Tools\libScePad for PC Games(DualSense and DUALSHOCK4)\PadforPCGames\include\pad.h (Module.WinDualShock.cpp (Compile [x64]))
UbaCacheClient - FILE WITHOUT ROOT: C:\Program Files (x86)\SCE\Common\External Tools\libScePad for PC Games(DualSense and DUALSHOCK4)\PadforPCGames\include\pad_types.h (Module.WinDualShock.cpp (Compile [x64]))
UbaCacheClient - FILE WITHOUT ROOT: C:\Program Files (x86)\SCE\Common\External Tools\libScePad for PC Games(DualSense and DUALSHOCK4)\PadforPCGames\include\pad_windows_static.h (Module.WinDualShock.cpp (Compile [x64]))
UbaCacheClient - FILE WITHOUT ROOT: C:\Program Files (x86)\SCE\Common\External Tools\libScePad for PC Games(DualSense and DUALSHOCK4)\PadforPCGames\include\trigger_effect_static.h (Module.WinDualShock.cpp (Compile [x64]))
UbaCacheClient - FILE WITHOUT ROOT: C:\Program Files (x86)\SCE\Common\External Tools\libScePad for PC Games(DualSense and DUALSHOCK4)\PadforPCGames\include\pad_audio.h (Module.WinDualShock.cpp (Compile [x64]))



Hi,

I wanted to check with the UBA experts, but they are currently out of office until next week. I’m not familiar with this, but I think that modifying \Engine\Plugins\Runtime\Windows\WinDualShock\Source\WinDualShock\WinDualShock.Build.cs like below should do it. I don’t know how to test it yet, but if you want to give it a try, feel free.

			// Use reflection to allow type not to exist if console code is not present
			System.Type LibScePadType = System.Type.GetType("LibScePad");
			bool bHasSupport = false;
			string PlatformName = "";
			if (LibScePadType != null)
			{
				MethodInfo GetPadLibLocationMethod = LibScePadType.GetMethod("GetPadLibLocation");
				object[] GetPadLibLocationMethodParams = new object[] { EngineDirectory, Target.WindowsPlatform.Compiler, null };
				bHasSupport = (bool)GetPadLibLocationMethod.Invoke(null, GetPadLibLocationMethodParams);
				PlatformName = (string)LibScePadType.GetMethod("GetPlatformName").Invoke(null, new object[] { EngineDirectory, Target.WindowsPlatform.Compiler });
				if (bHasSupport)
				{
					ExtraRootPath = ("LibScePad", (string)GetPadLibLocationMethodParams[2]);
 
					AddEngineThirdPartyPrivateStaticDependencies(Target,
						"LibScePad",
						"DX11Audio",
						"XAudio2_9"
					);
					string[] Includes = new string[2];
					Includes[0] = "ApplicationCore_Sony";
					Includes[1] = "ApplicationCore_" + PlatformName;
					PrivateIncludePathModuleNames.AddRange(Includes);
				}
			}

Regards,

Patrick

Thanks Patrick,

As a matter of fact we had kind of the same code in one of our module and I ended up with the same solution (after struggling a bit to undderstand how to get the output param value ;).

Hi,

Thanks for the feedback. I created a JIRA (UE-315257) for this so that we can fix it for UE 5.7.

Regards,

Patrick