AI Command Lab // Flight Simulator
100A: The Data Cockpit
Initial AI Output (Fragile)
// AI-Generated Code: Hard-coded and rigid
public class Enemy : MonoBehaviour {
public float health = 100f; // Audit Fail: This is logic + data
public float speed = 5f;
}
Initial AI Prompt
"You ask the AI: "Make a script for an enemy with 100 health and 5 speed.""
Pilot Comm Link
Mission Objective: Direct the AI to use RaycastAll to detect multiple targets in a single line of sight.
Optimized Protocol
// The Manifest (Data)
[CreateAssetMenu]
public class EnemyData : ScriptableObject {
public float health;
public float speed;
}
// The Manual (Logic)
public class Enemy : MonoBehaviour {
public EnemyData data; // Reference the manifest!
}