Unreal Dump

Things that I find out about Unreal Engine that are cool.

// Unreal Engine // Published on April 20, 2023, 10:22 a.m.

  • TEnumRange
    • see \Runtime\Core\Public\Misc\EnumRange.h.
    • for (const EMyEnum Val : TEnumRange<EMyEnum>())
    • Required to use ENUM_RANGE_BY_COUNT, ENUM_RANGE_BY_FIRST_AND_LAST, or ENUM_RANGE_BY_VALUES
  • BlueprintAuthorityOnly, tbh some of these TIL.
    • UFUNCTION(BlueprintCallable, BlueprintAuthorityOnly, Category = "MyCategory")
  • EditCondition, VisibleCondition, and EditConditionHides
    • UPROPERTY(..., meta = (EditCondition="bToggled")) or UPROPERTY(..., meta = (EditCondition="MyEnum == MyEnum::None")) etc
  • FSimpleMulticastDelegate and FSimpleDelegate
    • These are delegates that you can bind only in C++ and don't support any args. If using these you don't have to do the macro to define them as they're already defined so it helps clean up your classes.
  • TArrayView
    • You can do some cool stuff with this class, such as splitting an array.
  • FDateRange, FDoubleRange, FFloatRange, FInt8Range, FInt16Range, FInt32Range, FInt64Range -
    • see \Runtime\Core\Public\Math\Range.h
  • APlayerState::CopyProperties and APlayerState::OverrideWith
  • FWorldDelegates 
  • UE_NONCOPYABLE macro
  • FFormatNamedArguments
  • UE_ARRAY_COUNT
  • ThisClass - used when well... using delegates etc &ThisClass::MethodName
  • UEnum class - has some really useful methods
  • PawnLeavingGame - override this in your PlayerController class and it will prevent your pawn from being destroyed on disconnect
  • FDebug::DumpStackTraceToLog to dump the callstack to the log

 

until next time