AI Command Lab // Flight Simulator
102E: Component Visibility Audit
Initial AI Output (Fragile)
// AI-Generated Code: Visual Noise
public class Ship : MonoBehaviour {
public float maxSpeed = 100f; // Designer needs this
// Audit Fail: Designer does NOT need this.
// Editing this in the Inspector will break the physics math.
public float currentSpeed;
}
Initial AI Prompt
"You ask the AI: "Make a variable for the current speed that other scripts can read.""
Pilot Comm Link
Mission Objective: Use Query to find specific elements within the VisualTreeAsset.
Optimized Protocol
public class Ship : MonoBehaviour {
public float maxSpeed = 100f;
// Safe! Accessible by code, invisible to designer.
[HideInInspector] public float currentSpeed;
}