Tier 3 Series 205

205E: The Device Switch

Pilot Record
Student Profile
"If the player picks up a gamepad, the UI should say "Press A." If they touch the keyboard, it should say "Press Space." A Pilot uses the `PlayerInput` component to detect the active Control Scheme."

The Concept: Control Schemes

Defining which devices work together.

* **Keyboard&Mouse Scheme:** Required devices.
* **Gamepad Scheme:** Required devices.
* **OnControlsChanged:** An event that fires when the user swaps input methods.
Red Flag Detected

The AI Trap: "The Static Tutorial"

You ask the AI: "Show a tutorial prompt."

// AI-Generated Code: Confusing UI
text.text = "Press Space to Jump";
// Audit Fail: The player is holding a PlayStation controller.
// "Space" means nothing to them.

This is "Context Blindness." The game is ignoring the reality of the user's hardware.

Elite Telemetry

Research shows "Elite" teams achieve 15% faster lead times by keeping AI on a "very tight leash."

  • Small Batches Solving one problem at a time prevents logic drift.
  • Modular Design Localizing the "blast radius" of AI changes.
  • Tight Loops Rapid iteration with constant code review.

The Pilot's Correction

Corrective Protocol
// Corrected: Context Aware
void OnControlsChanged(PlayerInput input) {
    if (input.currentControlScheme == "Gamepad") ShowButtonIcon();
    else ShowKeyIcon();
}
Your Pilot Command
> A skilled Pilot directs the AI to listen for changes. You command: "Subscribe to OnControlsChanged and update the UI icons based on playerInput.currentControlScheme."
Next Mission
The Rebind Protocol