Namespace in Unreal Engine

Naming Conventions

  • All code and comments should use U.S. English spelling and grammar.
  • First letters:The first letter of each word in a name (such as type name or variable name) is capitalized, and there is usually no underscore between words. For example, Health and UPrimitiveComponent are correct, but not lastMouseCoordinates or delta_coordinates.
  • Prefixes:

    Type names are prefixed with an additional upper-case letter to distinguish them from variable names. For example, FSkin is a type name, and Skin is an instance of a FSkin.
    • T - Template classes
    • U - Classes that inherit from UObject
    • A - Classes that inherit from AActor
    • S - Classes that inherit from SWidget
    • I - Classes that are abstract interfaces
    • E - Enums.
    • b - Boolean variables (example, bPendingDestruction, bHasFadedIn...).
    • F - Most other classes, though some subsystems use other letters.
    • Typedefs should be prefixed by whatever is appropriate for that type: F if it's a typedef of a struct, U if it's a typedef of a UObject and so on.
      • A typedef of a particular template instantiation is no longer a template, and should be prefixed accordingly, for example: typedef TArray<FMytype> FArrayOfMyTypes;
    • Prefixes are omitted in C#.
    • UnrealHeaderTool requires the correct prefixes in most cases, so it's important to provide them.
  • Type and variable names are nouns.
  • Method names are verbs that describe the method's effect, or describe the return value of a method that has no effect.
  • All functions that return a bool should ask a true/false question, such as IsVisible() or ShouldClearBuffer().

Assets prefixes

  • Material assets profixes

    • Material: M_
    • Material Instance: MI_
    • Physics Asset: PHYS_
    • Physics Material: PM_
    • Post Process Material: PPM_
  • Skeletal Mesh: SK_
  • Static Mesh: SM_
  • Texture: T_
  • OCIO Profile: OCIO_

Blueprints prefixes

  • Blueprint BP_
  • Blueprint Interface: BI_
  • Widget Blueprint: WBP_
  • Actor Component: AC_
  • Animation Blueprint: ABP_
  • Curve Table: CT_
  • Data Table: DT_
  • Enum: E_
  • Structure: F_

Particle Effects prefixes

  • Particle System (Cascade) PS_
  • Niagara Emitter PFE_
  • Niagara System FXS_
  • Niagara Function FXF_

Skeletal Mesh Animations

  • Rig Rig_
  • Skeleton SKEL_
  • Montages AM_
  • Animation Sequence AS_
  • Blend Space: BS_

Animation

  • Level Sequence LS_
  • Sequencer Edits EDIT_

Media

  • Media Source MS_
  • Media Output MO_
  • Media Player MP_
  • Media Profile MPR_

Others

  • HDRI: HDR_
  • Level Snapshots SNAP_
  • Remote Control Preset RCP_
  • NDisplay Configuration NDC_