Is there anyway to check if in Actor Blueprint Viewport c++?


I’ve created an actor component inheriting in spring arm class. I lerp the Target Arm Length and the Socket Offset in Function tick but somehow they’re being played on the Blueprint Viewport.

Is there anyway I could stop the tick from being run in the Actor blueprint viewport and only in the level itself only?

Thanks! :slight_smile:

In c++ you have the method “IsTemplate()”

Super::TickComponent(DeltaTime, TickType, ThisTickFunction);

    	if (IsTemplate())
    	if (bIsZooming && !FMath::IsNearlyEqual(this->TargetArmLength, ZoomLength, 0.1f))
    		this->TargetArmLength = FMath::FInterpTo(this->TargetArmLength, ZoomLength, DeltaTime, ZoomSpeed);
    	else if (!bIsZooming && !FMath::IsNearlyEqual(this->TargetArmLength, OriginalTargetArmlength, 0.1f))
    		this->TargetArmLength = FMath::FInterpTo(this->TargetArmLength, OriginalTargetArmlength, DeltaTime, ZoomSpeed);
    	if (FMath::IsNearlyEqual(this->SocketOffset.Y, YOffset * CurrentDirection, 0.5f)) { return; }
    	this->SocketOffset.Y = FMath::FInterpTo(this->SocketOffset.Y, YOffset * CurrentDirection, GetWorld()->DeltaTimeSeconds ,LerpSpeed);`enter code here`

This is the code i have. I left the super::Tick above the template so i can still see it when i move the camera target arm length. still not working so far. I tried restarting the editor and reparenting the blueprint.

I tried browsing through the documentation, Still haven’t found what i need. I’m considering whether I’m gonna live with it and test through playing in the editor. lmao.

Okay i found it. It’s “bTickInEditor = false”.

I finally fixed it! For anyone having the same problem. Just set the bTickInEditor to false.