PlayDynamicForceFeedback node in 4.20 fails to cook

DaGaffer
Mon, 24 Sep 2018 20:18:32 +0000
Blueprint

The PlayDynamicForceFeedback blueprint node fails to cook in 4.20 while nativizing because the function was moved to private in APlayerController.h.

The relevant patch note:

Improvement: You can now invoke dynamic force feedback effects from native code using Player Controller’s Play Dynamic Force Feedback function. The latent function has been made private and only usable from blueprints so it can no longer be misused.

This change works fine while not nativizing the blueprint(s) calling the code, but while nativizing it will error out saying that the private function is not accessible.

UATHelper: Packaging (Windows (64-bit)): C:\GV\GoneViral4.11\Intermediate\Plugins\NativizedAssets\Windows\Game\Source\NativizedAssets\Private\GV_GameInstance__pf2132744816.cpp(849): error C2248: ‘APlayerController::PlayDynamicForceFeedback’: cannot access private member declared in class ‘APlayerController’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.20\Engine\Source\Runtime\Engine\Classes\GameFramework/PlayerController.h(1067): note: see declaration of ‘APlayerController::PlayDynamicForceFeedback’
UATHelper: Packaging (Windows (64-bit)): C:\Program Files\Epic Games\UE_4.20\Engine\Source\Runtime/Engine/Classes/Matinee/MatineeActor.h(13): note: see declaration of ‘APlayerController’

Workarounds include writing C++ code for your project that calls the non-latent function, or setting the appropriate files to not nativize.

4 posts - 1 participant