# CLAUDE.md — Unreal Engine 5 (C++)

## Build
- Build from the IDE or `Build.bat <Project>Editor Win64 Development <path>.uproject`. After adding a UCLASS/USTRUCT, regenerate project files if needed.
- Never edit files in `Intermediate/`, `Binaries/`, `Saved/`, or `*.generated.h`.

## Conventions
- Follow Epic's naming: `A` Actors, `U` UObjects/components, `F` structs, `E` enums, `I` interfaces, `b` prefix for bools.
- Any UObject pointer stored as a member must be a `UPROPERTY()` (use `TObjectPtr<>`) so the GC tracks it. Use `TWeakObjectPtr` for non-owning references.
- Expose tunables with `UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="...")`; keep logic in C++, content/tuning in Blueprints.
- Disable Tick (`PrimaryActorTick.bCanEverTick = false`) unless needed; prefer timers and events/delegates.
- Gameplay ability work uses GAS if the project already includes it.
- Multiplayer: mark replicated props with `Replicated`/`ReplicatedUsing` and implement `GetLifetimeReplicatedProps`; validate Server RPCs.
- Use `UE_LOG` with a project log category, and `check`/`ensure` for invariants.

## Don't
- Don't use raw `new`/`delete` for UObjects (use `NewObject`/`SpawnActor`). Don't hold UObject pointers in non-UPROPERTY containers.
