Naming Convention
Naming Conventions details
See : docs.unrealengine.com/CodingStandard
Prefix are omitted in C# UnrealHeaderTool requires the correct prefixes in most cases, so it's important to provide them
| Prefix | Desc |
|---|---|
| T | Template classes |
| A | Inherit from AActor. Can be spawned directly into the world |
| S | Inherit from SWidget |
| I | Abstract Interface Classes |
| U | Extend from the base class of all gameplay objects. These cannot be directly instanced into the world |
| E | Enums |
| F | Other Classes |
| b | Boolean variable |
typedef TArray<FMytype> FArrayOfMyTypes | Typedefs should be prefixed by whatever is appropriate for that type |
- All functions that return a bool should ask a true/false question, such as
IsVisible()orShouldClearBuffer() - A procedure should use a strong verb followed by an Object.. Names to avoid include those beginning with "Handle" and "Process" because the verbs are ambiguous.
- Prefix function parameter names with "Out" if they are passed by reference
- If an In or Out parameter is also a boolean, put the "b" before the In/Out prefix, such as
bOutResult. - Functions that return a value should describe the return value :cpp
// what does true mean? bool CheckTea(FTea Tea); // name makes it clear true means tea is fresh bool IsTeaFresh(FTea Tea);
Examples:
cpp
float TeaWeight;
int32 TeaCount;
bool bDoesTeaStink;
FName TeaName;
FString TeaFriendlyName;
UClass* TeaClass;
USoundCue* TeaSound;
UTexture* TeaTexture;