unity-editor-tooling
Unity Editor tooling, build automation, and asset pipeline customization. PROACTIVELY activate for: (1) writing custom Editor scripts, (2) custom inspectors and PropertyDrawer attributes, (3) EditorWindow creation, (4) ScriptedImporter for custom asset types, (5) build pipeline scripting (BuildPipeline.BuildPlayer, IBuildPostprocessor), (6) platform-switching automation, (7) CI/CD for Unity (GameCI, GitHub Actions, Unity Build Automation), (8) Assembly Definition (.asmdef) organization, (9) preprocessor symbols and platform defines, (10) Editor-only code with #if UNITY_EDITOR. Provides: custom inspector templates, EditorWindow examples, build script patterns, GameCI setup, .asmdef best practices, and CI YAML for Unity builds.
What this skill does
# Unity Editor Scripting and Tooling
## Overview
Reference for extending the Unity Editor, automating builds, testing, version control configuration, and package development. Covers custom inspectors, editor windows, build pipeline scripting, CI/CD, and the Unity Test Framework.
## Custom Inspectors
### Basic Custom Editor
```csharp
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(EnemySpawner))]
public class EnemySpawnerEditor : Editor
{
SerializedProperty spawnPoints;
SerializedProperty enemyPrefab;
SerializedProperty spawnInterval;
void OnEnable()
{
spawnPoints = serializedObject.FindProperty("_spawnPoints");
enemyPrefab = serializedObject.FindProperty("_enemyPrefab");
spawnInterval = serializedObject.FindProperty("_spawnInterval");
}
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(enemyPrefab);
EditorGUILayout.Slider(spawnInterval, 0.1f, 10f, new GUIContent("Spawn Interval"));
EditorGUILayout.Space();
EditorGUILayout.LabelField("Spawn Points", EditorStyles.boldLabel);
EditorGUILayout.PropertyField(spawnPoints, true);
if (GUILayout.Button("Add Spawn Point at Origin"))
{
spawnPoints.InsertArrayElementAtIndex(spawnPoints.arraySize);
var newElement = spawnPoints.GetArrayElementAtIndex(spawnPoints.arraySize - 1);
newElement.vector3Value = Vector3.zero;
}
serializedObject.ApplyModifiedProperties();
}
void OnSceneGUI()
{
var spawner = (EnemySpawner)target;
// Draw handles in scene view for each spawn point
for (int i = 0; i < spawner.SpawnPointCount; i++)
{
Vector3 point = spawner.GetSpawnPoint(i);
Vector3 newPoint = Handles.PositionHandle(point, Quaternion.identity);
if (point != newPoint)
{
Undo.RecordObject(spawner, "Move Spawn Point");
spawner.SetSpawnPoint(i, newPoint);
}
}
}
}
#endif
```
**Key rules:**
- Always wrap editor code in `#if UNITY_EDITOR` or place in `Editor/` folders
- Use `SerializedProperty` for undo/redo support and multi-object editing
- Call `serializedObject.Update()` before and `ApplyModifiedProperties()` after changes
- Use `Undo.RecordObject()` before direct modifications
### PropertyDrawer
```csharp
[CustomPropertyDrawer(typeof(MinMaxRange))]
public class MinMaxRangeDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.BeginProperty(position, label, property);
var min = property.FindPropertyRelative("min");
var max = property.FindPropertyRelative("max");
float minVal = min.floatValue;
float maxVal = max.floatValue;
position = EditorGUI.PrefixLabel(position, label);
EditorGUI.MinMaxSlider(position, ref minVal, ref maxVal, 0f, 100f);
min.floatValue = minVal;
max.floatValue = maxVal;
EditorGUI.EndProperty();
}
}
```
Use PropertyDrawers for reusable field-level customization. Use CustomEditors for component-level customization.
## EditorWindow
```csharp
public class LevelEditorWindow : EditorWindow
{
[MenuItem("Tools/Level Editor")]
static void ShowWindow() => GetWindow<LevelEditorWindow>("Level Editor");
Vector2 scrollPos;
string searchFilter = "";
void OnGUI()
{
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
searchFilter = EditorGUILayout.TextField(searchFilter, EditorStyles.toolbarSearchField);
if (GUILayout.Button("Refresh", EditorStyles.toolbarButton, GUILayout.Width(60)))
RefreshData();
EditorGUILayout.EndHorizontal();
scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
// Draw content
EditorGUILayout.EndScrollView();
}
void OnSelectionChange() => Repaint(); // React to selection changes
}
```
Use `EditorWindow` for standalone tools. Use `[MenuItem]` for menu bar integration. Override `OnSelectionChange`, `OnHierarchyChange`, `OnProjectChange` for reactive updates.
## ScriptedImporter
```csharp
[ScriptedImporter(1, "leveldata")]
public class LevelDataImporter : ScriptedImporter
{
public override void OnImportAsset(AssetImportContext ctx)
{
string json = File.ReadAllText(ctx.assetPath);
var levelData = ScriptableObject.CreateInstance<LevelData>();
JsonUtility.FromJsonOverwrite(json, levelData);
ctx.AddObjectToAsset("main", levelData);
ctx.SetMainObject(levelData);
}
}
```
Register custom file extensions. Unity re-imports automatically when the source file changes.
## Build Pipeline
### Build Script
```csharp
public static class BuildScript
{
[MenuItem("Build/Build Windows")]
public static void BuildWindows()
{
var options = new BuildPlayerOptions
{
scenes = EditorBuildSettings.scenes
.Where(s => s.enabled)
.Select(s => s.path).ToArray(),
locationPathName = "Builds/Windows/Game.exe",
target = BuildTarget.StandaloneWindows64,
options = BuildOptions.None
};
var report = BuildPipeline.BuildPlayer(options);
if (report.summary.result != BuildResult.Succeeded)
throw new Exception($"Build failed: {report.summary.totalErrors} errors");
}
}
```
### CI/CD with GameCI (GitHub Actions)
```yaml
name: Unity Build
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
targetPlatform: [StandaloneWindows64, StandaloneLinux64, WebGL]
steps:
- uses: actions/checkout@v4
with:
lfs: true
- uses: game-ci/unity-builder@v4
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: ${{ matrix.targetPlatform }}
buildMethod: BuildScript.Build${{ matrix.targetPlatform }}
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.targetPlatform }}
path: build/${{ matrix.targetPlatform }}
```
Activate a Unity license first using `game-ci/unity-activate`. Use Unity Build Automation (Cloud Build) as an alternative if CI runners lack capacity.
## Assembly Definitions
```text
Project/
├── Scripts/
│ ├── Core/ Core.asmdef (no references)
│ ├── Gameplay/ Gameplay.asmdef (references: Core)
│ ├── UI/ UI.asmdef (references: Core, Gameplay)
│ ├── Networking/ Networking.asmdef (references: Core)
│ ├── Editor/ Editor.asmdef (references: Core; Editor-only platform)
│ └── Tests/
│ ├── EditMode/ Tests.EditMode.asmdef (references: Core; Test assemblies)
│ └── PlayMode/ Tests.PlayMode.asmdef (references: Core, Gameplay)
```
**Benefits:** Incremental compilation (only recompile changed assemblies), enforced dependency boundaries, required for testability.
**Rules:**
- Set Editor-only assemblies to Editor platform only
- Test assemblies must reference `UnityEngine.TestRunner` and `UnityEditor.TestRunner`
- Use Assembly Definition References for cross-assembly access
## Unity Test Framework
### Edit Mode Test
```csharp
[TestFixture]
public class InventoryTests
{
[Test]
public void AddItem_IncreasesCount()
{
var inventory = new Inventory(maxSlots: 10);
inventory.Add(new Item("Sword", 1));
Assert.AreEqual(1, inventory.Count);
}
[Test]
public void AddItem_WhenFull_ReturnsFalse()
{
var inventory = new Inventory(maxSlots: 1);
inventory.Add(new Item("Sword", 1));
Assert.IsFalse(inventory.Add(neRelated in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.