Visual Audit Protocol

Asset Workflow

Return to Hangar
101A

The Inspector Audit

The Concept: The [SerializeField] Attribute

public float val;
Serialized
// Corrected: Protected and Tunable public class PlayerJump : MonoBehaviour { // Audit Pass: Only this script can change it via code, // but the Designer can tune it in Unity. [SerializeField] private float jumpForce = 10f; }
101B

Serialization Limits

The Concept: The Serializable Attribute

class Data { int a; }
class Stats { int b; }
Visible
// Corrected: Visible and Editable [System.Serializable] // The Magic Tag public class ItemStats { public int weight; public int cost; } public class Inventory : MonoBehaviour { public ItemStats stats; // Audit Pass: Now shows a foldout! }
101C

The Modular Asset

The Concept: ScriptableObject Architecture

SO
Data
Instance
// Corrected: Lightweight Reference [CreateAssetMenu] // Allows right-click creation public class SwordData : ScriptableObject { public float damage; public string description; } public class Sword : MonoBehaviour { public SwordData data; // Points to the shared asset }
101D

Custom Editors

The Concept: Inspector Customization

Component Context
Reset
Remove Component
Debug: Full Heal
// Corrected: Professional Tooling [ContextMenu("Debug: Full Heal")] // Right-click component to run! public void FullHeal() { health = maxHealth; Debug.Log("Player Healed via Inspector"); }
101E

File I/O Safety

The Concept: Persistent Data Paths

PC Only
C:/Users/...
Android
CRASH
// Corrected: Cross-Platform Safe void SaveScore(string data) { string path = Path.Combine(Application.persistentDataPath, "score.txt"); File.WriteAllText(path, data); }
101F

Prefab Logic

The Concept: Prefabs & Variants

Base Prefab
Variant Inherits Logic
CAPSTONE EXAM

The Engineer's Exam

The flight deck is a mess. The previous engineer left exposed wires, hardcoded save paths, and broken blueprints. Identify the three critical asset workflow failures to certify your status as a Flight Engineer.

Verify Capacity
Check Scope
Audit Efficiency