# Editor build exits 6: `hides overloaded virtual function [-Werror,-Woverloaded-virtual]` on a project helper named `SetCameraMode` (shadows `APlayerController::SetCameraMode(FName)`)

- **Status:** current
- **Engine:** ue6-main `61e2877e`, Linux (the platform of the journal this entry is taken from), Clang (INFERRED from the diagnostic's spelling; toolchain version not recorded)
- **Context:** standalone UE6 project (not UEFN); native C++: a two-argument member function named `SetCameraMode` in a class `ACoopPlayerController`. Verse dialect/runtime: not recorded.
- **Prerequisites:** a C++ project with an editor target. Plugins, CVars and files: not recorded.

## Symptom

The editor compilation exited 6 with:

```text
error: 'ACoopPlayerController::SetCameraMode' hides overloaded virtual function [-Werror,-Woverloaded-virtual]
```

The name shadowed `APlayerController::SetCameraMode(FName)`.

## Smallest example / reproduction

Declare a two-argument member function named `SetCameraMode` in a class that derives from `APlayerController` (INFERRED: the bullet says the name shadowed the engine function), then build the editor target.

Not recorded: the source file, the line number, the helper's parameter types and the build command. This is the shape of the reproduction, not a file that was re-run.

## Solution

Rename the helper. Coop Zero renamed its two-argument `SetCameraMode` to `ApplyCameraPreference`, and the editor compilation passed.

## Why it works

The diagnostic says the project's `SetCameraMode` hides an overloaded virtual function, and the bullet names the hidden one: `APlayerController::SetCameraMode(FName)`. In C++, a member function of a derived class hides every base-class function of the same name that it does not override. The helper took two arguments and did not override the one-argument engine function. The build stopped because the diagnostic is an error: it is printed as `error:` with the `[-Werror,…]` suffix. Under the new name nothing in the base class is hidden.

## Verified

- **Evidence level:** compiled.
- **How:** After the rename the editor target compiled; the clean compile took 27.94 seconds. The shared build wrapper had deferred that retry once with `load 41.11 > 40, waiting 60 s`. The build command and the log file are not recorded.
- **Date / by:** 2026-11-25, Coop Zero Step 13.

## Limits and assumptions

This entry was written from one journal bullet and uses only what that bullet records. INFERRED from the bullet: the compiler is Clang and `-Werror` made the warning fatal (both from the diagnostic's `[-Werror,-Woverloaded-virtual]` suffix). The engine commit and the platform come from the journal's section heading, not from the bullet.

Not recorded: the compiler version, where the `-Werror` setting comes from, the source file and line, the helper's two parameter types, the build command, the log file, and whether anything outside the class called the engine's `SetCameraMode(FName)`.

Not tested: the same name in other engine base classes, other compilers, and a `using` declaration instead of a rename. Reported to Epic: not recorded; the bullet describes a name clash in project code, not an engine defect.
