AI Command Lab // Flight Simulator
101D: Custom Editors
Initial AI Output (Fragile)
// AI-Generated Code: Slow and Clunky
void Update() {
// Audit Fail: Adding debug code to Update is messy.
// You have to run the game and press 'H' to test it.
if (Input.GetKeyDown(KeyCode.H)) {
FullHeal();
}
}
Initial AI Prompt
"You ask the AI: "I need a way to heal the player fully while testing the game.""
Pilot Comm Link
Mission Objective: Tell the AI to use Raycast from the camera to the mouse position for world interaction.
Optimized Protocol
// Corrected: Professional Tooling
[ContextMenu("Debug: Full Heal")] // Right-click component to run!
public void FullHeal() {
health = maxHealth;
Debug.Log("Player Healed via Inspector");
}