Visual Audit Protocol

The Foundation Pilot

Return to Hangar
1A

The Capacity Check

Check containers.

// Corrected Code public int coinCount = 0; void AddCoin() { coinCount++; // Simple, efficient, and mathematically correct. }
// AI-Generated Code public string coinCount = "0"; void AddCoin() { coinCount = coinCount + 1; // ERROR: Can't do math on text! }
1B

Scope Authority

The Concept: Public vs. Private

SECURE
// Corrected Pilot Code [SerializeField] private float moveSpeed = 5.0f; // Now it is visible in the Unity Inspector, // but PROTECTED from other scripts.
1C

Logic Gateways

In Chapter 2, we explore how C# uses Operators to compare values. As an AI Pilot, you must ensure the AI is using the correct "Checklist" before performing a game action. == Is Equal To && AND (Both True) || OR (Either True)

TRAP: The AI Trap: "The Impossible Purchase"
// Vague Prompt Result: Fails the Sanity Check void BuyUpgrade() { coinCount -= 50; Debug.Log("Upgrade Purchased!"); }
1D

Efficiency Audit

The Concept: Start() vs. Update()

The AI Trap: "The Performance Drag"
The Pilot's Command
1E

The Blueprint

The Concept: Single Responsibility


Input

Data
CAPSTONE EXAM

The Pilot's Exam

You are the Lead Architect for JumpQuest. A Junior AI has just handed you the core Player Controller script. It technically compiles, and the player moves—but it is full of "Sanity Errors" that will crash the game's performance and security later.

Verify Capacity
Check Scope
Audit Efficiency