UELogDefine
#define print(text) if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 1.5, FColor::Green,text)
#define printFString(text, fstring) if (GEngine) GEngine->AddOnScreenDebugMessage(-1, 5.f, FColor::Magenta, FString::Printf(TEXT(text), fstring))
//print("Hello Unreal");
//printFString("My Variable Vector is: %s", *MyVector.ToString());
UELogScreen
GEngine->AddOnScreenDebugMessage(1,3,FColor::Purple,$FString$);
UELogTemp
UE_LOG(LogTemp,Log,TEXT("$Text$"));
UEEventOverlap
UFUNCTION()
void $OnBeginOverlap$(class UPrimitiveComponent* OverlappedComponent,AActor* OtherActor,
class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex,
bool bFromSweep, const FHitResult& SweepResult);
UEEventHit
UFUNCTION()
void OnCompHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
UEFindObject
static ConstructorHelpers::FObjectFinder<$T$> ObjFind(TEXT("$Name$"));
if (ObjFind.Succeeded())
{
//GetMesh()->SetSkeletalMesh(Cast<USkeletalMesh>(ObjFind.Object));
}
UEFindClass
static ConstructorHelpers::FClassFinder<T> ClsFind(TEXT("Name"));
if (ClsFind.Succeeded())
{
//ClsFind.Class; //Get UClass
}
CreateDefaultSubobjectEx
CreateDefaultSubobject<$T$>(TEXT("$Name$"));
UEMetaBindWidget UPROPERTY(meta=(BindWidget))
UEMetaEditCondition UPROPERTY(EditAnywhere,meta=(EditCondition="VarName"))
UEMetaAllowPrivate UPROPERTY(meta=(AllowPrivateAccess="true"))
UEMetaAllowedClasses UPROPERTY(meta=(AllowedClasses="$Cls$"))
UEMetaExposeOnSpawn UPROPERTY(meta=(ExposeOnSpawn = true))
UETimer
FTimerHandle timerHandle;
GetWorld()->GetTimerManager().SetTimer(timerHandle, this, &$Fn$, 0.5f, false);
UETimer_Lambda
FTimerHandle $TH$;
GetWorldTimerManager().SetTimer(TimerHandler_Pause,FTimerDelegate::CreateLambda([&]() {
GetWorldTimerManager().ClearTimer($TH$);
//TODO
}),1.5f,false);
UEDisableActor
void DisableActor(bool bHide)
{
SetActorHiddenInGame(bHide);
SetActorEnableCollision(false);
SetActorTickEnabled(false);
}