Cannot create class extending ADirectionalLight

Version 4.9.2-2707645+++depot+UE4-Releases+4.9

CompilerResultsLog:Error: Error MyDirectionalLight.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostLoad(void)" (?PostLoad@ADirectionalLight@@UEAAXXZ)
CompilerResultsLog:Error: Error MyProject.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostLoad(void)" (?PostLoad@ADirectionalLight@@UEAAXXZ)
CompilerResultsLog:Error: Error MyDirectionalLight.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ADirectionalLight@@UEAAXAEBVFName@@@Z)
CompilerResultsLog:Error: Error MyProject.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::LoadedFromAnotherClass(class FName const &)" (?LoadedFromAnotherClass@ADirectionalLight@@UEAAXAEBVFName@@@Z)
CompilerResultsLog:Error: Error MyDirectionalLight.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ADirectionalLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
CompilerResultsLog:Error: Error MyProject.generated.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl ADirectionalLight::PostEditChangeProperty(struct FPropertyChangedEvent &)" (?PostEditChangeProperty@ADirectionalLight@@UEAAXAEAUFPropertyChangedEvent@@@Z)
CompilerResultsLog:Error: Error C:\Users\me\Documents\Unreal Projects\MyProject\Binaries\Win64\UE4Editor-MyProject-1928.dll : fatal error LNK1120: 3 unresolved externals

To replicate, either change any existing C++ class to extend from ADirectionalLight or add a new C++ class from within the editor using File > New C++ Class and then attempt to build the project.

This issue is occurring in both existing and new 4.9.2 projects.

Issue persists even after cleaning and rebuilding the project.

Hey icannotfly-

This is intended behavior. The DirectionalLight class is not intended to be extended. The suggested workflow would be to add a UDirectionalLightComponent* to a class and work with it from there.

Cheers

Got it. Did I miss a mention of this somewhere or are the unresolved externals my hint?

Correct, the unresolved externals is meant to explain the compiler doesn’t know what the referenced class is.

True, but I wasn’t sure if that was because I missed an include somewhere.

Thanks!