AI Command Lab // Flight Simulator
203A: The Glass Cockpit
Initial AI Output (Fragile)
// AI-Generated Code: The Canvas Heavy approach public Text healthText; public Image ammoIcon; public GameObject radarPanel; // Audit Fail: This requires dragging 50 references in the Inspector. // It breaks easily if you rename an object.
Initial AI Prompt
"You ask the AI: "Create a HUD with health, ammo, and radar.""
Pilot Comm Link
Mission Objective: A skilled Pilot directs the AI to use the Toolkit. You command: "Bind to the UIDocument and query the root VisualElement for the named controls."
Optimized Protocol
// Corrected: Clean & Code-Driven
var root = GetComponent<UIDocument>().rootVisualElement;
var healthLabel = root.Q<Label>("HealthDisplay");
// No drag-and-drop required.