Resource
Class prefixes, header layout, specifier usage, include order, and coding conventions that follow Epic's style.
Every class in Unreal Engine uses a single-letter prefix that signals its base type. The compiler doesn't enforce these, but the engine's reflection system, garbage collector, and tooling all depend on them.
UUObject (non-actor)YesUHealthComponent, UAbilitySystemComponentAAActorYesACharacter, AProjectile, APickupItemFStructs and non-UObject classesNoFVector, FHitResult, FGameplayTagSSlate widgetsNoSButton, STextBlock, SCompoundWidgetEEnumsN/AEMovementMode, EWeaponType, ETeamIdTTemplatesN/ATArray, TMap, TSubclassOf, TWeakObjectPtrIInterfaces (UInterface)NoIInteractable, IDamageable, IAbilitySystemInterfaceUnreal Engine headers follow a specific layout. The generated header include goes last in the include list, and the class body follows a consistent order.
Within the class declaration, it's ideal to group members by access level and purpose. Public interface first, then protected overrides, then private implementation.
Every exposed property needs a specifier that tells the engine how it behaves in the editor and at runtime. Pick the most restrictive specifier that satisfies the use case.
EditDefaultsOnlyEditable on class defaults onlyBase stats, config that doesn't change per instanceEditInstanceOnlyEditable on placed instancesPer-instance overrides in the levelEditAnywhereEditable on defaults and instancesGeneral-purpose editable propertiesVisibleDefaultsOnlyRead-only on defaultsDebug or computed values on the CDOVisibleInstanceOnlyRead-only on instancesRuntime state you want to inspectVisibleAnywhereRead-only everywhereComponents and runtime stateBlueprintReadOnlyReadable in BlueprintValues Blueprint reads but doesn't writeBlueprintReadWriteRead/write in BlueprintValues Blueprint can freely modifyFunction specifiers control how C++ functions interact with Blueprint and the engine's reflection system.
BlueprintCallableCall from BlueprintExpose a C++ function to Blueprint graphsBlueprintPureCall without execution pinConst functions with no side effectsBlueprintImplementableEventImplement in BlueprintC++ declares, Blueprint defines the bodyBlueprintNativeEventOverride in BlueprintC++ provides default, Blueprint can overrideServerRuns on serverRPC from client to serverClientRuns on owning clientRPC from server to clientNetMulticastRuns on server and all clientsRPC broadcast to everyoneReliableGuaranteed deliveryCritical RPCs that must arrive (use sparingly)UnreliableBest-effort deliveryFrequent RPCs like cosmetic updatesIn .cpp files, the include order matters for Unreal Header Tool (UHT) compatibility. The matching header always goes first.