manage-sprite-atlas
Installation
SKILL.md
Unity SpriteAtlas V2
Provides editor-safe procedural knowledge for scripting atlases in Unity projects. V2 enforces strict separation between editor authoring and runtime access.
⚠ Critical V2 Principle:
SpriteAtlasis runtime-only.SpriteAtlasAssetis editor-only. Never mix contexts. Always use V2.
Important
- Use the unity cli (
unity command --format json) and theunity-cliandunity-pipelineskills for each step. - Run C# with
unity command script eval --code '<snippet>'. Don't useusingdirectives or unqualified types in the snippet. The compiler reads usingUnityEngineand a bare AssetDatabase, SpriteAtlas, or Object causes errors (CS0246 / CS0103 / CS0104).returnwhat you want to read; it arrives atdata.result.result. - Before making changes, establish a baseline of the current behavior so you can tell whether a later result is actually caused by your change.
- Create a restore point you can roll back to if your changes fail.
- Do only what's asked. Don't change unrelated assets or files.
- Never leave verification code in the user's script. Never build logging or detection they didn't ask for. See Final step.
- Avoid long explanations.
Full topic map
Before you go forward with a workflow or diagnosis: