skills/clawhub.ai/Unreal Engine

Unreal Engine

Installation
SKILL.md

Garbage Collection

  • Raw pointers to UObjects get garbage collected — use UPROPERTY() to prevent
  • UPROPERTY() marks for GC tracking — without it, pointer becomes dangling
  • TWeakObjectPtr for optional references — doesn't prevent collection, check IsValid()
  • NewObject<T>() for UObjects — never raw new, GC won't track it

UPROPERTY and UFUNCTION

  • UPROPERTY() required for Blueprint access — and for GC tracking
  • UFUNCTION() for Blueprint callable/events — also required for replication
  • EditAnywhere vs VisibleAnywhere — edit allows changes, visible is read-only
  • BlueprintReadWrite vs BlueprintReadOnly — controls Blueprint access level

Actor Lifecycle

  • BeginPlay after all components initialized — safe to access components
  • Constructor runs on CDO (Class Default Object) — don't spawn actors or access world
  • PostInitializeComponents before BeginPlay — for component setup
  • EndPlay for cleanup — called on destroy and level transition
Installs
1
First Seen
Aug 21, 2026
Unreal Engine from clawhub.ai