Could one of you geniuses help me out? I can’t figure out why none of my UFUNCTION(BlueprintCallable) custom functions will appear in Blueprints. I’ve tried compiling, recompiling, rebuilding the project. No errors, but also no show in the Blueprints for the BP_Player
object.
[From Grabber.h]
public:
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
UFUNCTION(BlueprintCallable)
void Grab();
UFUNCTION(BlueprintCallable)
void Release();
and
[From Grabber.cpp]
void UGrabber::Grab()
{
FVector Start = GetComponentLocation();
FVector End = Start + GetForwardVector() * MaxGrabDistance;
DrawDebugLine(GetWorld(), Start, End, FColor::Red);
FCollisionShape Sphere = FCollisionShape::MakeSphere(GrabRadius);
FHitResult HitResult;
bool HasHit = GetWorld()->SweepSingleByChannel(
HitResult,
Start, End,
FQuat::Identity,
ECC_GameTraceChannel2,
Sphere);
if(HasHit)
{
AActor* HitActor = HitResult.GetActor();
AActor *HitActor = HitResult.GetActor();
UE_LOG(LogTemp, Display, TEXT("ObjectHit: %s"), *HitActor->GetActorNameOrLabel());
}
else
{
UE_LOG(LogTemp, Display, TEXT("No Actor Hit"));
}
}
void UGrabber::Release()
{
UE_LOG(LogTemp, Display, TEXT("Released Grabber"));
}