Description

Attempting to call a FRootMotionMovementParams function results in an unresolved externals error on compile because of the static FVector RootMotionScale variable.

Workaround:
In source, removing static allows code to compile successfully.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add code to project based on Actor (MyActor)
  3. Add the following to MyActor.cpp BeginPlay() function
    FRootMotionMovementParams MyParams;
    MyParams.ConsumeRootMotion(0.5f);
    
  4. Compile

Result:
Compile fails with Unresolved External error shown in callstack field

Expected:
RootMotionMovementParams is recognized and code compiles.

Callstack

LNK2001 unresolved external symbol "private: static struct FVector FRootMotionMovementParams::RootMotionScale" (?RootMotionScale@FRootMotionMovementParams@@0UFVector@@A)

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

3
Login to Vote

Fixed
ComponentOLD - Anim
Affects Versions4.14.24.14.34.15
Target Fix4.16
Fix Commit3344780
Main Commit3362661
CreatedJan 11, 2017
ResolvedMar 21, 2017
UpdatedMay 18, 2020