Files
UnrealEngine/Engine/Source/Runtime/AIModule/AICodingStandard.md
2025-05-18 13:04:45 +08:00

1.7 KiB
Raw Blame History

AI Teams coding standard extension

In all cases Epics coding standard has higher priority. AI Teams coding standard needs to remain compatible and act as an extension and clarification where Epics is unclear or leaves room for interpretation.

Code organization and naming

cpp files
  • If a source file has implementation of multiple structs/classes, use the following header to mark the beginning of each class/struct to make it super clear when new implementation begins.
//----------------------------------------------------------------//
//  FMyTypeName
//----------------------------------------------------------------//
  • Keep member functions of a given type together, avoid interlacing functions of multiple types.
Subsystems

WorldSubsystem-derived classes need to have a Subsystem postfix, while other subsystem-y classes that are not related with any of the engine's subsystem classes get a Manager postfix.

Namespaces

Unreal Engine standard here.

Nested namespaces declaration should be done in a single line, like so:

namespace UE::Mass::Debug
{ 
//...	
} // namespace UE::Mass::Debug

Debug-time code

Debugging-related member function names should start with Debug prefix.


FAQ

add things that can be best explained as a simple answer to a simple question. These things can be reflected above as well. This section needs to remain last at all times.

Q: What do I do when the thing? A: You do the thing.