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,
HealthandUPrimitiveComponentare correct, but notlastMouseCoordinatesordelta_coordinates. Prefixes:
Type names are prefixed with an additional upper-case letter to distinguish them from variable names. For example,FSkinis a type name, andSkinis an instance of aFSkin.
T- Template classesU- Classes that inherit fromUObjectA- Classes that inherit fromAActorS- Classes that inherit fromSWidgetI- Classes that are abstract interfacesE- 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:
Fif it's a typedef of a struct,Uif it's a typedef of aUObjectand 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;
- A typedef of a particular template instantiation is no longer a template, and should be prefixed accordingly, for example:
- 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_
- Material:
- 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_