You are on page 1of 2

---------------------- -> Active

AddActor ... // ... World ... Offset/Rotation


UStaticMeshComponent* p_someVar_mesh; // Define in private +
UPROPERTY(VisibleAnywhere), then construct it with CreateDefaultSubobject<>
RootComponent = p_someVar_mesh; // Make the mesh the root
// To add transform through time -> Accumulate DeltaTime, then operate with that
(mul to increase speed of accum)
ctrl+B, ctrl+5 // check, launch
shift+f1 // viewport

---------------------- -> Unreal quirks


FString // Needs TEXT() for format, *stringName_s to deref when using %s
FVector
FRotator // Vector for rotation
FQuat
TArray

---------------------- -> Debug


DrawDebug ... // Debug vis
UE_LOG(LogTemp, Warning, TEXT("text %i"), ... someVariable); // Cmd out
GEngine->AddOnScreenDebugMessage // On screen out, Check if GEngine == 0 before
using

---------------------- -> Static Structs


FColor:: ...
FMath:: // Math library
FString::Printf(TEXT(" ... %i"), intVar_i);

---------------------- -> Template f(x)


CreateDefaultSubobject<someType>(TEXT("someString_s")) // Returns an address of
created subobject -> Store in p_somePointer
- ... <UStaticMeshComponent> ...
!lingo!: "A Factory" -> A function that constructs an object ->
Equivalent to new in c++

---------------------- -> Exposing to Interface(BP, etc.)


UPROPERTY() / UFUNCTION()
- ...(EditDefaultsOnly) // Global promote only
- ...(EditInstanceOnly) // Individual promote only
- ...(EditAnywhere) // Global and Individual promote

- ...(VisibleDefaultsOnly) // Global disabled only


- ...(VisibleInstanceOnly) // Individual disabled only
- ...(VisibleAnywhere) // Global and Individual disabled

- ...(BlueprintReadOnly) // BP get -> should be at least protected


- ...( ..., meta = (AllowPrivateAccess = "True")) // BP get -> can be
private
- ...(BlueprintReadWrite) // BP get, set -> should be at least protected

- ...(Category = "")
- ...( ... "stringVariable_s") // Custom category for housekeeping

- template<typename someTypeInput> // Can take type input -> Template


function -> is flexible
someTypeInput functionName(someTypeInput someVariable, someTypeInput
someVariable)
!call syntax!: functionName<someType>( ...)
- ...(BlueprintCallable) // Usable in BP as node, execution dependant ->
Caches result -> is called when Execution reaches it
// "Promises not to modify state or members inside the class in any way"
// "Generally used for getter functions or operators that just output a data
value"
- ...(BlueprintPure) // Usable in BP as node, execution independant -> Does
not cache result -> is called every time it's needed

You might also like