Download

How To Make Changes To Base UE4 Classes?

Hello,

I want to change 2 functions in the Character.h and the CharacterMovement.cpp. They are:

  • Line 1717 = FVector UCharacterMovementComponent::ConstrainAnimRootMotionVelocity in CharacterMovementComponent.cpp
  • Line 361 = FORCEINLINE class USkeletalMeshComponent* GetMesh() in Character.h

Normally, I inherit from the base ue4 code and override the functions I want to, but Unfortunately, these two functions are not virtual so I cannot override them. How can I make changes to the base UE4 code? It seems to be separate from my project. Do I need to recompile the whole engine, or is there an existing solution I can modify?

You have to grab the engine source from GitHub, make the changes, and compile everything.

1 Like