💻 Coding
Unity 6 C# MonoBehaviour from a Feature Brief (Input System, No Find-in-Update)
Write a Unity 6 C# MonoBehaviour from a feature brief using the Input System. No GameObject.Find in Update. No invented APIs.
0Reviews
Prompt
Act as a Unity 6 C# gameplay programmer who only uses a pasted feature brief. You write a MonoBehaviour that uses the Input System the brief already names. You do not call GameObject.Find or FindObjectOfType inside Update. You do not invent Unity APIs, package versions, or scene paths. This is not a full game and not an asset-store listing. You work only from Inputs. Do not invent stats, citations, quotes, URLs, names, IDs, or records that are not in Inputs. Inputs: - Feature brief I lock: [Brief] - Unity version I lock: [Version] - Input actions I lock (or NONE): [Actions] - Words I must not use: [Banned] - What I must never invent (APIs, packages, scene paths, Find-in-Update): [Never] - Output format: [Format] - Language: [Lang] - Class name I may name (or UNKNOWN): [Class] Generate: 1. Honesty ledger: Brief nouns, Version, Actions, Class, Lang. Forbidden: invented APIs, packages, scene paths, Find-in-Update. 2. Class sketch: fields serialized in Awake/OnEnable, not looked up in Update. Missing refs write NOT IN INPUTS. 3. Input System wiring from Actions only. Unknown action maps write NOT IN INPUTS. 4. Update/FixedUpdate: movement or state from cached refs only. Comment the no-Find rule. 5. Refuse list: GameObject.Find in Update, inventing Cinemachine versions, inventing scene paths, inventing paid assets. 6. Compliance pass: quote Banned and Never hits. Cut them. Format as Format. Constraints: - Unity 6 MonoBehaviour from Brief only. Input System only as named. - Never Find in Update. Honor Version. - No emojis.
Instructions
Replace every [bracket] with your details before running. Works on ChatGPT, Claude, and Gemini.
Examples
Example Input
Brief: top-down mover on a kinematic Rigidbody as pasted; read Move action as Vector2 as pasted; face travel direction as pasted. Jump NOT IN INPUTS. Camera follow NOT IN INPUTS. Version: Unity 6.0 LTS as pasted (do not invent 6000.2) Actions: Move as Vector2 in Player map as pasted. Sprint NOT IN INPUTS. Banned: GameObject.Find, FindObjectOfType, guaranteed 120fps Never: invent APIs, invent packages, invent scene paths, Find in Update Format: ledger + class + input + update + refuse + gaps Lang: English Class: TopDownMover
Example Output
1. Ledger. Brief: top-down mover; kinematic Rigidbody; Move Vector2; face travel direction. Jump NOT IN INPUTS. Camera follow NOT IN INPUTS. Version Unity 6.0 LTS. Actions: Move Vector2 in Player map. Sprint NOT IN INPUTS. Class TopDownMover. Lang English. Forbidden: invented APIs, packages, scene paths, Find-in-Update, GameObject.Find, FindObjectOfType, guaranteed 120fps.
2. Class sketch.
using UnityEngine; using UnityEngine.InputSystem;
public class TopDownMover : MonoBehaviour {
[SerializeField] Rigidbody body; // assign in inspector; do not Find in Update
[SerializeField] InputActionReference moveAction; // Player/Move as pasted
Vector2 move;
void OnEnable(){ if(moveAction!=null) moveAction.action.Enable(); }
void OnDisable(){ if(moveAction!=null) moveAction.action.Disable(); }
void Awake(){ if(body==null) Debug.LogWarning("body NOT IN INPUTS"); }
}
3. Input wiring. Player/Move as Vector2 as pasted. Read in Update into cached move. Sprint action NOT IN INPUTS. Action asset path NOT IN INPUTS.
4. Update (no Find).
void Update(){
// Rule: no GameObject.Find / FindObjectOfType here.
if(moveAction==null) return;
move = moveAction.action.ReadValue<Vector2>();
}
void FixedUpdate(){
if(body==null) return; // missing ref, do not search the scene
Vector3 v = new Vector3(move.x, 0f, move.y);
body.MovePosition(body.position + v * Time.fixedDeltaTime);
if(v.sqrMagnitude>0.0001f) body.MoveRotation(Quaternion.LookRotation(v));
}
Jump code not invented. Camera follow not invented. Scene path NOT IN INPUTS.
5. Refuse. GameObject.Find in Update: refused. Cinemachine package version: refused. Assets/Scenes/Main.unity path: refused. Paid asset names: refused. Unity 6000.2 invention: refused.
6. Compliance. Banned hits none in output (Find appears only in refuse). Format ledger+class+input+update+refuse+gaps. Gaps: move speed lock, PlayerInput component vs references, ground mask, animation hooks, Input System package exact version beyond Unity 6.0 LTS.
Missing-data policy: if a field was blank, write NOT IN INPUTS rather than guessing. Lock any tool version named in Inputs; if unnamed, write unknown. No invented testimonials, star ratings, or press logos. If legal, clinical, insurance, HR, education-plan, or veterinary content appears, add a one-line not-advice and de-identify banner. Quote banned-word hits and cut them. End with a gaps list of five bullets the user still owes you. Character and byte caps in the job are hard; print counts when relevant. Refuse to backfill DOIs, exam dumps, PHI, PII, or compensation promises not in Inputs.