本文へ移動
cccskills
無料GitHub で公開

sprite-editor

Edits Unity sprite properties by generating C# editor scripts using ISpriteEditorDataProvider APIs. Handles sprite rectangles, borders, pivots, outlines, and slicing operations (automatic, grid, isometric). Use when working with sprite assets, sprite sheets, texture atlases, or sprite slicing.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3スター 26(GitHub 26 + cccskills 0)
連携ツールUnity

実行スコア 未検証

インストール方法を見る

含まれるファイル(13)

  • SKILL.md3.6 KB
  • references/api_reference.md5.9 KB
  • references/background.md4.0 KB
  • references/templates.md2.8 KB
  • scripts/AutomaticSliceTexture.cs2.2 KB
  • scripts/GenerateNewSpriteRects.cs8.6 KB
  • scripts/GetTextureSourceImageSize.cs1.3 KB
  • scripts/GetTextureToSlice.cs2.6 KB
  • scripts/GridSliceTexture.cs2.4 KB
  • scripts/IsometricSliceTexture.cs6.8 KB
  • scripts/README.md4.7 KB
  • scripts/SetPivotExample.cs2.5 KB
  • scripts/SpriteToPng.cs3.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Sprite Editor

Sprite metadata (rects, borders, pivots, outlines) lives inside the importer, not in a file you can edit — reaching it means running C# through a live Editor.

The unity-cli skill owns getting you there — installing the CLI, confirming a connected Editor, adding the project's com.unity.pipeline package, telling a genuinely absent Editor apart from one stuck in Safe Mode, and discovering the Editor's command catalog. Follow it first; don't re-derive any of it here.

Two things it can't know for you:

  • You need eval in particular, not just a reachable Editor. Confirm it appears in the catalog — its presence depends on the Pipeline package version, not on the CLI.
  • Never hand-edit a .meta file to change sprite metadata. The importer owns that data and the capability checks below exist to prevent corruption, so an unreachable Editor is a stop, not a cue to improvise.

Run C# through the connected Editor with the eval command. Discover its parameter shape from unity command --format json rather than assuming one — the inline form is unity command eval --code '<snippet>', and some Pipeline versions also register eval_file for running a snippet from a file. Check the catalog before reaching for eval_file; it is frequently absent. unity command defaults to a 30 second timeout.

Generates C# editor scripts to manipulate Unity sprites using ISpriteEditorDataProvider. Works with TextureImporter, PSBImporter, and custom importers.

Passing C# to eval

eval compiles a statement block, not a file. Two consequences, both of which cause a compile error rather than a warning:

  • No using directives. The compiler reads using UnityEngine; as a resource-disposal statement and rejects it (CS0210).
  • Types must be fully qualified. A bare AssetDatabase or Volume does not resolve (CS0246 / CS0103), and a bare Object is ambiguous with object (CS0104).

Where a snippet below is written as a file — with usings, for readability, or because it is meant to be saved into the project — qualify the types before passing it to eval.

Workflow

All generated scripts must follow the Safe Core Pattern in references/templates.md, which includes MANDATORY capability checks. NEVER attempt operations if capability checks fail - this prevents data corruption. After execution, verify results in Unity console and Project window.

Common Operations

Modify Name/Rect/Border/Pivot: Update corresponding SpriteRect fields (see scripts/SetPivotExample.cs for pivot examples)

  • Requires: EditSpriteName, EditSpriteRect, EditBorder, or EditPivot

Add/Remove/Slice: Create or filter SpriteRect array (see references/background.md for Unity 2021.2+ requirements)

  • Requires: CreateAndDeleteSprite

Set Outlines: Get ISpriteOutlineDataProvider → Call SetOutlines() with GUID + Vector2 arrays

Important Notes

  • Do NOT use AssetPostprocessor or MenuItem patterns
  • Generate standalone snippets only — no AssetPostprocessor, no MenuItem
  • Enum assignments: Always use enum values and cast to numeric types. Never use raw numbers.
    • ✅ Correct: (int)SpriteAlignment.Center
    • ❌ Wrong: 1 (magic number)

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

コメント

ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。

まだコメントはありません。最初のコメントを書いてみませんか。

送信するとすぐに公開されます。メールアドレスや電話番号などの個人情報は書かないでください。URL は 2 つまでです。

0 / 1000 文字

このフォームは reCAPTCHA で保護されており、Google のプライバシーポリシーと利用規約が適用されます。

同じリポジトリのスキル

Map and editing guide for Assets/Scenes/MainScene.unity (the main editor scene of DeedPlanner 3). Use whenever reading, querying, or modifying the main scene — finding a UI element, tab, panel, camera, or manager in the hierarchy, checking how a view is wired into VContainer DI, or planning scene edits. Contains the full structural map so you don't have to scan the 25k-line YAML.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3262026年10月21日 更新

Generates custom Shader Graph nodes from HLSL code. Use when the user wants to create a new Shader Graph node or make existing HLSL code work as a reflected function node.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3262026年10月21日 更新

ui

無料

Unity UI expert for menus, HUDs, screens, panels, buttons, labels, and all visual interface elements. Handles questions about UI in scenes or prefabs (how many elements, what exists, structure analysis), styling changes (colors, borders, backgrounds, fonts, spacing, rounded corners), layout adjustments, and UI generation. Routes to UI Toolkit, uGUI, or IMGUI based on project context.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3262026年10月21日 更新

ui-imgui

無料

Unity IMGUI (Immediate Mode GUI) expert for legacy editor tools using OnGUI/immediate mode. Generates and modifies IMGUI EditorWindows, custom Inspectors, PropertyDrawers, and scripts with IMGUI code (OnGUI, OnInspectorGUI). Use when maintaining existing IMGUI editor code or when user explicitly requests IMGUI/OnGUI.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3262026年10月21日 更新

ui-ugui

無料

Unity uGUI (Canvas-based) UI expert. Understands, edits, and generates Canvas hierarchies, RectTransforms, Layout Groups, and prefab UI. Use for requests involving Canvas, uGUI, RectTransform, or .prefab UI files.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3262026年10月21日 更新

ui-uitk

無料

Unity UI Toolkit expert for Unity 6.0+. Understands, edits, and generates UXML and USS files with flex-based layouts. Use for requests involving .uxml, .uss, UI Toolkit, UIElements, UIDocument, UI runtime binding, Custom UI Elements, Manipulators or PanelSettings.

日本語の概要は準備中です。原文の説明を表示しています。

Warlander/DeedPlanner-3262026年10月21日 更新

Warlander のスキルをすべて見る

このスキルの問題を報告する