AI Command Lab // Flight Simulator
7F: The Region Ranger
Initial AI Output (Fragile)
// AI-Generated Code: Disorganized and Flat
public class Drone : MonoBehaviour {
public float speed;
void Start() { ... }
public void TakeDamage() { ... }
private float health;
void Update() { ... }
public void Move() { ... }
// Audit Fail: Variables are mixed with methods.
// Navigation is slow and error-prone.
}
Initial AI Prompt
"You ask the AI: "Add health, movement, and collision logic to the drone.""
Pilot Comm Link
Mission Objective: A skilled Mechanic directs the AI to **Scaffold the Script**. You command: "Organize this script using #region blocks for Variables, Unity Methods, and Public API."
Optimized Protocol
// 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
}