Unity grid level editor

From furkantokkan/agent-foundry · View interactive version

Unity grid level editor is an AI agent skill from the GitHub repository furkantokkan/agent-foundry. Implement a Unity UI Toolkit grid level editor with pure edit commands, irregular-piece transforms, grouped Undo, reload-safe transient drafts, exact-source saving, bounded solver validation, and isolated test play. Use for puzzle authoring tools that share rules with runtime.

How to use this skill

Skill file

Unity Grid Level Editor

Use unity-cli and unity-game-dev for repository readiness and tooling.

Read the authoring recipe before changing draft,

geometry, save, preview or solver behavior. Inspect the runtime board rules

and existing authoring authority first.

Establish ownership

Choose one authored data authority per dataset. A draft, recovery record,

runtime catalog and scene preview are separate owned projections, never

additional editable sources. Follow the current JSON/ScriptableObject choice;

do not add import/merge/export round trips without a request.

Name allowed code paths, exact writable datasets/settings and test scratch

paths. Save only owned assets, never globally with AssetDatabase.SaveAssets

or a vendor helper that saves all dirty assets. Asset/schema/scene/settings

changes retain their target approval. Tests must leave unrelated dirty assets

and production data untouched.

Build the authoring lane

  1. Use pure edit commands: clone validated level data, apply one requested

edit, return a candidate or a refusal, and leave the input unchanged.

  1. Keep UI tool/selection/ghost state outside authored data. Use one shared

geometry service for rendering, coordinate conversion and hit testing.

  1. Own one transient serialized draft for Undo and editor bindings. Store

saved baseline and pending template edits separately. Group each user

gesture and join a caller's group when the gesture is already owned.

  1. Preserve draft recovery across reload under a window-scoped identity.

Restore only when database identity, selected level and source fingerprint

match. Unbind before disposing the old draft.

  1. Validate the save candidate and compare external source changes before

writing. Write exact canonical data successfully before marking saved or

transferring pending template edits. Use one-way runtime derivation.

  1. Build previews in a transient DontSave hierarchy from validated snapshots.

Invalid edits retain the last valid preview. Preview/playback does not

write authored data, Undo history or scene dirty state.

  1. Reuse runtime predicates/commands for support checks and solving. Separate

unsupported, cancelled and budget-exhausted results from proven unsolvable.

  1. Isolate test play with a temporary intent, test save and restored start-scene

setting. Teardown preview before entering Play Mode and clean up on return.

Verify and deliver

At the final stage, test pure command refusal, four rotations, pivot and edge

kick, ghost grip, resizing, Undo/Redo per gesture, reload restoration, changed

source rejection, exact-save failure and an unrelated dirty sentinel. Check

solver/runtime parity, determinism, unsupported content, cancellation and

budget exhaustion. Verify preview/test-play cleanup without wallet changes.

Use compile checks during development. Report the authority map, exact saved

targets, supported mechanics, solver verdict limits and actually executed

verification. Capacity and chunk sizes are project choices, not this recipe's

requirements.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.