Visual Audit Protocol

The Syntax Scout

Return to Hangar
7A

The Access Audit

The Concept: Public vs. Private

public int hp;
public float speed;
[Header]
public int hp;
public float speed;
7B

The Camel Case Protocol

The Concept: C# Standards

Non-Standard
// AI-Generated Code: Messy and Inconsistent void calc_dist() { // Audit Fail: 'd' and 'h' are meaningless names. // 'calc_dist' uses underscores, which isn't standard C#. float d = Vector3.Distance(transform.position, h.position); }
Standardized
// Corrected: Professional and Auditable. void CalculateDistanceToHangar() { // Audit Pass: Names are clear. Variables are camelCase. float distanceToHangar = Vector3.Distance(transform.position, hangarTarget.position); }
7C

The Constant Canopy

The Concept: Named Constants

10
Mystery Value
Damage 10
Named Constant
7D

The Namespace Navigator

The Concept: Namespaces

Global Space (Unsafe)
Namespace
// Corrected: Protected and Organized. namespace UnityAcademy.DroneSim { using UnityEngine; public class Drone : MonoBehaviour { // Audit Pass: Now uniquely identified as // UnityAcademy.DroneSim.Drone void Start() { Debug.Log("Sim Drone Online"); } } }
class Drone
class Drone
7E

The Comment Cleanup

The Concept: Quality over Quantity

// // AI-Generated Code: Redundant and Noisy void UpdateHealth(int amount) { // Subtract amount from health health -= amount; // Check if health is less than or equal to zero if (health <= 0) { // Log that the drone is destroyed Debug.Log("Drone destroyed"); } }
// subtracting health...
// checking if dead...
Intent Only
// // Corrected: Clean and Professional. void UpdateHealth(int amount) { health -= amount; if (health <= 0) { // We log here so the Mission Manager can trigger the respawn sequence. Debug.Log("Drone destroyed"); } }
7F

The Region Ranger

The Concept: Code Folding

#region Variables
#region Logic
// Corrected: Organized and Collapsible. public class Drone : MonoBehaviour { #region Variables [SerializeField] private float speed; [SerializeField] private float health; #endregion #region Unity Callbacks void Start() { ... } void Update() { ... } #endregion #region Public API public void TakeDamage() { ... } public void Move() { ... } #endregion }
#endregion
CAPSTONE EXAM

The Scout Exam

The AI has generated a "Flight Recorder" that is technically functional but visually chaotic. Identify the **three critical syntax failures** to ensure this script is pilot-ready.

Verify Capacity
Check Scope
Audit Efficiency