Error while compiling the error log

I get this error while compiling though I have written the code exactly same as in the lecture

The error is in ObjectGrabber line 26. Without seeing the code, we are unable to provide more help. (Paste code in, not screenshots and use the code format icon. < / > )

PhysicsHandle = GetOwner()->FindComponentByClass<UPhysicsHandleComponent>();
if(PhysicsHandle)
{
	//Physics is found
}else
{
	UE_LOG(LogTemp, Error, TEXT("No physics handle component found on %s"), 
         *GetOwner()->GetName());
}

It is in TickComponent function
is it has to be in BeginPlay?

Yes, that is probably it. You’ll need to make the change and build the code before launching the editor.

still has the same problem

Could you post Grabber.h and Grabber.cpp?

Privacy & Terms