Unreal Engine Development Standards
1. Engine Version
- •Target Version: 5.4.2 (Strict Lock).
- •Update Policy: Do not upgrade unless explicitly instructed.
2. Directory Structure
- •Content/: Store all assets here. Organizing by type (Materials, Meshes, Blueprints) is preferred over organizing by feature.
- •
Content/Blueprints/ - •
Content/Materials/ - •
Content/Maps/
- •
- •Source/: C++ source code.
- •
Source/SignalBastion/implies the primary game module.
- •
3. Blueprint vs. C++ Strategy (Hybrid)
- •C++:
- •Core Systems (Inventory, Health, Networking logic).
- •Base Classes (e.g.,
ABaseCharacter,ABaseBuilding). - •Complex Math or heavy loop operations.
- •Blueprint:
- •UI / HUD Logic.
- •Visual Effects & Animation handling.
- •Subclasses for Data tweaking (e.g.,
BP_GruntEnemyinheritsAEnemyBaseand setsHealth=100).
- •Rule: If a function is called every tick and involves math, move it to C++.
4. Networking (Replication)
- •Authority: The Server is the source of truth.
- •Variable Replication: Use
UPROPERTY(Replicated)andGetLifetimeReplicatedProps. - •RPCs:
- •
Server_Function()for client-to-server requests. - •
Client_Function()for server-to-client specific messages. - •
Multicast_Function()for visual events everyone sees (e.g., explosions).
- •
- •Validation: All Server RPCs must have
_Validateimplementation to prevent cheating.
5. Naming Conventions
- •Classes:
- •
Aprefix for Actors (AMyActor). - •
Uprefix for Objects (UMyObject). - •
Eprefix for Enums (EMyEnum). - •
Fprefix for Structs (FMyStruct). - •
Iprefix for Interfaces (IMyInterface).
- •
- •Variables:
bIsDeadfor booleans.
6. Build & Cook
- •Use
UnrealEditor-Cmd.exefor command-line builds if needed. - •Ensure no "Error/Warning" spam in Output Log.