|
Nelaric Unreal Gameplay
Gameplay framework API
|
English | 简体中文
Design public contracts for C++ first. Expose selected operations to Blueprint when they are useful there, through a clear adapter or reflected entry point. There is no compatibility promise yet; API changes still need to be visible and explained in their PR.
In a class that exposes gameplay operations, place the gameplay-facing methods in its first public: section, directly after the class opening and Unreal reflection macro when present. Place methods called only by framework integration or Unreal lifecycle code in a second public: section after the gameplay API. No other access specifier may appear between these two public: sections. The second section is a C++ access boundary, not a gameplay API; its methods do not require Doxygen comments. Keep methods that need no external access private or protected. A method's position must reflect its intended caller, not merely its current call sites.
All public types, gameplay-facing methods in the first public: section, enums and enum values, constants, gameplay extension contracts, and Blueprint-exposed entry points must have English Doxygen comments. Explain purpose and usage; document parameters and return values, ownership and lifetime, thread expectations, and failure, timeout, and cancellation semantics when relevant. Each public header must have an @file comment so file-level declarations are included in generated documentation. The second public: section may use ordinary implementation comments when helpful.
Follow the Doxygen comment standard for declaration coverage, format, content, and comment-line length.
The pull request check requires Doxygen comments on methods in the first public: section and builds Doxygen HTML, failing on documentation errors and warnings. The repository checker distinguishes the two sections; Doxygen automatically hides undocumented members. Reviewers still check that gameplay-facing comments explain behavior accurately. After merge, the approved documentation is published on GitHub Pages.