Error when setting Outer Cone spotlight angle

Hi, i’m getting errors when i’m trying to set the outer cone angle on one of the spotlights i have created with c++.

This is the error i’m getting.
Error 1 error LNK2019: unresolved external symbol “public: void __cdecl ASpotLight::SetOuterConeAngle(float)” (?SetOuterConeAngle@ASpotLight@@QEAAXM@Z) referenced in function “public: virtual void __cdecl ALightOrigin::BeginPlay(void)” (?BeginPlay@ALightOrigin@@UEAAXXZ) C:\Users\Documents\Unreal Projects\Temple\Intermediate\ProjectFiles\LightOrigin.cpp.obj

And this is my code for creating and setting the angle of the cone.

void ALightOrigin::BeginPlay()

	ASpotLight* SpotLightTemp;
	SpotLightTemp = GWorld->SpawnActor<ASpotLight>(ASpotLight::StaticClass());

Is this a bug or am i doing something wrong?

Found this in the ASpotLight class header.

// BEGIN DEPRECATED (use component functions now in level script)
UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
void SetInnerConeAngle(float NewInnerConeAngle);
UFUNCTION(BlueprintCallable, Category="Rendering|Lighting", meta=(DeprecatedFunction))
void SetOuterConeAngle(float NewOuterConeAngle);

How do i access the component functions that are apparently in level script?

It also says it’s deprecated, which means that it shouldn’t be used and will be removed in a future release. I don’t see anything listed in the documentation that could replace it, though.

I LOVE that comment, any idea what it means? It sounds like that functionality got moved to another place, but it’s not obvious to me where it is.

I’m quite confused as to why they would remove such an important variable from the spotlight class and move it to another location. Thanks for explaining what deprecated stood for though. :slight_smile:

Did you ever figure out a replacement for this? It’s 2017, Unreal 4.14, and the “deprecated” function is still in the header, still causing unresolved issues, and I can’t find any replacement suggested anywhere.