public
\\UFUNCTION()
\\BlueprintCallable 蓝图调用:可以。
\\BlueprintPure 声明一个纯函数
\\BlueprintImplementableEvent:声明该函数为蓝图可实现事件,在蓝图中可以实现该事件的逻辑
UFUNCTION(BluePrintCallable)
void ReducePlayerHealth();
在.cpp文件里面调用一下这个函数
void AMyPlayer::ReducePlayerHealth(){}
UE_LOG(LogTemp,Warning,TEXT("大家都是帅哥美女"));
UFUNCTION(BlueprintPure)
Bool IsSuccessful();
.cpp文件里面
bool AMyPlaer::IsSuccessful(){
return true;
}