Download

Creating class using UTimelineComponent

Hi,

Unreal 4.26.1 here.

In my project, I attempt to create a new C++ class based on UTimelineComponent, as I have something that I want to build into my game so that anything using a timeline can now use my version which will have some additional functionality and reduce duplicated code / variables across my project.

I find that if I just create the class, and try to compile my project (no changes other than New C++ Class - TimelineComponent) I just have a log full of strange errors like so:



Error LNK2001 unresolved external symbol "public: virtual void __cdecl UTimelineComponent::GetLifetimeReplicatedProps(class TArray<class FLifetimeProperty,class TSizedDefaultAllocator<32> > &)const " (?GetLifetimeReplicatedProps@UTimelineComponent@@UEBAXAEAV?$TArray@VFLifetimeProperty@@V?$TSizedDefaultAllocator@$0CA@@@@@@Z)
Error LNK2001 unresolved external symbol "public: virtual void __cdecl UTimelineComponent::TickComponent(float,enum ELevelTick,struct FActorComponentTickFunction *)" (?TickComponent@UTimelineComponent@@UEAAXMW4ELevelTick@@PEAUFActorComponentTickFunction@@@Z)
Error LNK2001 unresolved external symbol "public: virtual void __cdecl UTimelineComponent::Activate(bool)" (?Activate@UTimelineComponent@@UEAAX_N@Z)
Error LNK2001 unresolved external symbol "public: virtual void __cdecl UTimelineComponent::Deactivate(void)" (?Deactivate@UTimelineComponent@@UEAAXXZ)
Error LNK2001 unresolved external symbol "public: virtual bool __cdecl UTimelineComponent::IsReadyForOwnerToAutoDestroy(void)const " (?IsReadyForOwnerToAutoDestroy@UTimelineComponent@@UEBA_NXZ)
Error LNK2001 unresolved external symbol "public: virtual bool __cdecl UTimelineComponent::IsPostLoadThreadSafe(void)const " (?IsPostLoadThreadSafe@UTimelineComponent@@UEBA_NXZ)



These errors do not go away until i remove the class, which just sits with an empty .cpp file and a boilerplate header file, nothing special in there at all.

So my question is, are we supposed to be able to create a new class based on UTimelineComponent? Does anyone know why I am getting these errors?

I’m not an expert at C++ so if it’s a really complicated issue, you might have to explain like I am 5.

Thanks