Unity Helpers

Logo

Treasure chest of Unity developer tools. Professional inspector tooling, high-performance utilities, spatial queries, and 20+ editor tools.

Wallstop Studios Unity Helpers - Editor Tools Guide

TL;DR — What You Get

Comprehensive documentation for all editor wizards, windows, and automation tools.


What Do You Want To Do? (Task-Based Index)

Optimize Sprite Memory & Performance

Create & Edit Animations

Build Sprite Atlases

Validate & Fix Prefabs

Analyze Code Quality

Apply Visual Effects

Automate Setup & Maintenance

Enhance Inspector Workflows

See the Inspector Attributes documentation for:


Table of Contents

  1. Texture & Sprite Tools
  2. Animation Tools
  3. Sprite Atlas Tools
  4. Validation & Quality Tools
  5. Custom Component Editors
  6. Property Drawers & Attributes
  7. Automation & Utilities
  8. Quick Reference

Texture & Sprite Tools

Image Blur Tool

Menu: Tools > Wallstop Studios > Unity Helpers > Image Blur

Purpose: Apply Gaussian blur effects to textures in batch for backgrounds, depth-of-field, or softened sprites.

Key Features:

Common Workflow:

1. Open Image Blur Tool
2. Drag sprite folder into designated area
3. Set blur radius (e.g., 10 for subtle, 50 for heavy)
4. Click "Apply Blur"
5. Find blurred versions with "_blurred_[radius]" suffix

Best For:

Visual Demo

Image Blur Tool showing before/after comparison as blur radius slider is adjusted

Adjusting blur radius from 0 to 200 pixels on a UI background texture


Sprite Cropper

Menu: Tools > Wallstop Studios > Unity Helpers > Sprite Cropper

Purpose: Automatically remove transparent padding from sprites to optimize memory and atlas packing.

Key Features:

Common Workflow:

1. Open Sprite Cropper
2. Add sprite directories to "Input Directories"
3. Set padding (e.g., 2px on all sides for outlines)
4. Enable "Only Necessary" to skip already-cropped sprites
5. Click "Find Sprites To Process" to preview
6. Click "Process X Sprites"
7. Replace originals with "Cropped_*" versions

**Danger Zone — Reference Replacement:**
- After cropping into `Cropped_*` outputs, you can optionally replace references to original sprites across assets with their cropped counterparts. This is powerful but destructive; review the preview output and ensure you have version control backups before applying.

Best For:

Performance Impact: Can reduce texture memory by 30-70% on padded sprites.

Visual Demo

Sprite Cropper showing original sprite with padding, then cropped result side-by-side

Before and after: transparent padding removed while preserving sprite content and pivot

Related Tools:


Texture Settings Applier

Menu: Tools > Wallstop Studios > Unity Helpers > Texture Settings Applier

Purpose: Batch apply standardized texture import settings across multiple assets.

Configurable Settings:

Common Configurations:

UI Sprites (Pixel-Perfect):

Filter Mode: Point
Wrap Mode: Clamp
Compression: CompressedHQ or None
Generate Mip Maps: false
Max Size: 2048 or match source

Environment Textures:

Filter Mode: Trilinear
Wrap Mode: Repeat
Compression: CompressedHQ
Generate Mip Maps: true
Crunch Compression: true

Character Sprites:

Filter Mode: Bilinear
Wrap Mode: Clamp
Compression: CompressedHQ
Generate Mip Maps: false

Workflow:

1. Open Texture Settings Applier
2. Configure desired settings with checkboxes
3. Add textures individually OR add directories
4. Click "Set" to apply
5. Unity reimports affected textures

Best For:

Visual Reference

Texture Settings Applier window showing configuration options

Texture Settings Applier with filter mode, wrap mode, and compression options

Related Tools:


Sprite Pivot Adjuster

Menu: Tools > Wallstop Studios > Unity Helpers > Sprite Pivot Adjuster

Purpose: Compute and apply alpha‑weighted center‑of‑mass pivots in bulk. Produces perceptually centered pivots (ignoring near‑transparent pixels) and speeds re‑imports by skipping unchanged results.

Key Features:

Workflow:

1) Open Sprite Pivot Adjuster
2) Add one or more directories
3) (Optional) Set Sprite Name Regex to filter
4) Adjust Alpha Cutoff (e.g., 0.01 to ignore fringe pixels)
5) Enable “Skip Unchanged” to reimport only when pivot changes
6) (Optional) Enable “Force Reimport” to override skip
7) Run the adjuster to write importer pivot values

Best For:

Visual Reference

Sprite Pivot Adjuster window showing alpha-weighted pivot calculation

Sprite Pivot Adjuster with alpha cutoff slider and directory selection


Sprite Settings Applier

Menu: Tools > Wallstop Studios > Unity Helpers > Sprite Settings Applier

Purpose: Apply sprite‑specific importer settings in bulk, driven by matchable “profiles” (Any/NameContains/PathContains/Regex/Extension) with priorities. Great for standardizing PPU, pivots, modes, and compression rules across large folders.

Profiles & Matching:

Key Settings (per profile):

Workflow:

1) Create a SpriteSettingsProfileCollection (Assets > Create > … if available) or configure profiles in the window
2) Open Sprite Settings Applier
3) Add directories and/or explicit sprites
4) Choose which profile(s) to apply and click Set
5) Unity reimports affected sprites

Best For:

Visual Reference

Sprite Settings Applier window showing profile configuration

Sprite Settings Applier with profile matching modes and import settings


Texture Resizer

Menu: Tools > Wallstop Studios > Unity Helpers > Texture Resizer

Purpose: Batch resize textures using bilinear or point filtering algorithms with configurable scaling multipliers.

Configuration Options:

How It Works:

  1. For each texture, calculates: extraWidth = width / (PPU * widthMultiplier)
  2. Resizes to newSize = (width + extraWidth, height + extraHeight)
  3. Repeats for numResizes iterations
  4. Overwrites original PNG files

Workflow:

1. Open Texture Resizer wizard
2. Add textures manually OR drag texture folders
3. Set algorithm (Bilinear for smooth, Point for pixel art)
4. Configure PPU and multipliers
5. Set number of resize passes
6. Click "Resize" to apply

Resize Algorithms:

Bilinear:

Point:

Best For:

Important Notes:

Visual Reference

Texture Resizer window showing resize algorithm options

Texture Resizer with bilinear/point algorithm selection and multiplier settings


Fit Texture Size

Menu: Tools > Wallstop Studios > Unity Helpers > Fit Texture Size

Purpose: Automatically adjust texture max size import settings to match actual source dimensions (power-of-two).

Key Features:

Fit Modes:

GrowAndShrink:

GrowOnly:

ShrinkOnly:

Workflow:

1. Open Fit Texture Size
2. Select Fit Mode (GrowAndShrink/GrowOnly/ShrinkOnly)
3. Add texture folders to process
4. Click "Calculate Potential Changes" to preview
5. Review how many textures will be modified
6. Click "Run Fit Texture Size" to apply

Example:

Source Texture: 1920x1080 pixels
Current Max Size: 512
Fit Mode: GrowAndShrink
Result: Max Size → 2048 (fits source dimensions)

Source Texture: 64x64 pixels
Current Max Size: 2048
Fit Mode: ShrinkOnly
Result: Max Size → 64 (matches source)

Algorithm:

Best For:

Performance:

Visual Reference

Fit Texture Size window showing fit mode options and preview

Fit Texture Size with GrowAndShrink/GrowOnly/ShrinkOnly mode selection


Animation Tools

Sprite Animation Editor (Animation Viewer Window)

Menu: Tools > Wallstop Studios > Unity Helpers > Sprite Animation Editor

Purpose: Visual editor for 2D sprite animations with real-time preview and frame manipulation.

Key Features:

Typical Workflow:

1. Open Sprite Animation Editor
2. Click "Browse Clips (Multi)..." to select animations
3. Click a loaded clip in left panel to edit
4. Drag frames in "Frames" panel to reorder
5. Adjust FPS field and click "Apply FPS"
6. Preview updates in real-time
7. Click "Save Clip" to write changes

Example Session:

// Edit walk cycle animation:
1. Load "PlayerWalk.anim"
2. Preview plays at original 12 FPS
3. Drag frame 3 to position 1 (change starting pose)
4. Change FPS to 10 for slower walk
5. Click "Apply FPS" to preview
6. Click "Save Clip" to finalize

Best For:

Tips:

Visual Demo

Sprite Animation Editor showing animation preview playing while frames are dragged to reorder

Drag-and-drop frame reordering with real-time preview updates

Sprite Animation Editor FPS adjustment showing animation speed changing live

Adjusting FPS slider and seeing immediate preview speed change


Animation Creator

Menu: Tools > Wallstop Studios > Unity Helpers > Animation Creator

Purpose: Bulk‑create AnimationClips from sprite naming patterns — one‑click generation from folders of sprites. Eliminates manual clip setup and ensures consistent naming, ordering, and FPS/loop settings.

Problems Solved:

Key Features:

Common Naming Patterns (auto‑detected):

Player_Idle_0.png, Player_Idle_1.png, ...       // base: Player_Idle, index: 0..N
slime-walk-01.png, slime-walk-02.png            // base: slime-walk, index: 1..N
Mage/Attack (0).png, Mage/Attack (1).png        // base: Mage_Attack, index: 0..N (folder prefix optional)

Custom Group Regex Examples:

// Named groups are optional but powerful when needed
^(?<base>.*?)(?:_|\s|-)?(?<index>\d+)\.[Pp][Nn][Gg]$   // base + trailing digits
^Enemy_(?<base>Walk)_(?<index>\d+)$                      // narrow to specific clip type

How To Use (one‑click flow):

1) Open Animation Creator
2) Add one or more source folders
3) (Optional) Set sprite filter regex to narrow matches
4) Click “Auto‑Parse Matched Sprites into Animations”
5) Review generated Animation Data (set FPS/loop per clip)
6) Click “Create” (Action button) to write .anim assets

Preview & Safety:

Tips:

Best For:

Visual Demo

Animation Creator auto-parse workflow showing sprites being grouped and clips generated

One-click auto-parse: sprites grouped by naming pattern, clips generated instantly

Related Tools:


Animation Copier

Menu: Tools > Wallstop Studios > Unity Helpers > Animation Copier

Purpose: Analyze, duplicate, and synchronize AnimationClips between source and destination folders with previews, dry‑runs, and cleanup actions.

What It Analyzes:

Workflow:

1) Open Animation Copier
2) Select Source Path (e.g., Assets/Sprites/Animations)
3) Select Destination Path (e.g., Assets/Animations)
4) Click “Analyze Source & Destination”
5) Review New/Changed/Unchanged/Orphans tabs (filter/sort)
6) Choose a copy mode:
   - Copy New / Copy Changed / Copy All (optional force replace)
7) (Optional) Dry Run to preview without writing
8) Use Cleanup:
   - Delete Unchanged Source Duplicates
   - Delete Destination Orphans

Safety & Options:

Best For:

Visual Reference

Animation Copier window showing source/destination analysis

Animation Copier with new/changed/unchanged/orphan tabs and copy actions


Sprite Sheet Animation Creator

Menu: Tools > Wallstop Studios > Unity Helpers > Sprite Sheet Animation Creator

Purpose: Turn a sliced sprite sheet into one or more AnimationClips with live preview, drag‑to‑select sprite ranges, and per‑clip FPS/loop/cycle offset.

Key Features:

Usage:

1) Open Sprite Sheet Animation Creator
2) Drag a sliced Texture2D (or use the object field)
3) Select frames (drag across thumbnails) to define a clip
4) Name the clip, set FPS/curve, loop, cycle offset
5) Repeat to add multiple definitions
6) Click “Generate Animations” and choose output folder

Best For:

Visual Demo

Sprite Sheet Animation Creator showing drag-select across sprite thumbnails with live preview

Drag-select frame ranges on sprite sheet thumbnails with instant preview playback


Animation Event Editor

Menu: Tools > Wallstop Studios > Unity Helpers > AnimationEvent Editor

Purpose: Advanced visual editor for creating and managing animation events with sprite preview, method auto-discovery, and parameter editing.

Key Features:

Workflow:

1. Open Animation Event Editor
2. Drag Animator component into "Animator Object" field
3. Select animation from dropdown (or use Animation Search)
4. Set "FrameIndex" for new event
5. Click "Add Event" to create event at that frame
6. Configure event:
   a. Select TypeName (MonoBehaviour with event methods)
   b. Select MethodName from available methods
   c. Set parameters (int, float, string, object, enum)
7. Reorder events if needed (Move Up/Down buttons)
8. Click "Save" to write changes to animation clip

Modes:

Explicit Mode (Default):

Non-Explicit Mode:

Control Frame Time:

Sprite Preview:

Event Management:

Adding Events:

  1. Set “FrameIndex” to desired frame
  2. Click “Add Event”
  3. Event created at frame time

Editing Events:

Reordering:

Resetting:

Parameter Types Supported:

Best For:

Tips:

Common Method Signatures:

using WallstopStudios.UnityHelpers.Core.Attributes;

public class CharacterAnimationEvents : MonoBehaviour
{
    [AnimationEvent]  // Shows in Explicit Mode
    public void PlayFootstep() { }

    [AnimationEvent]
    public void SpawnEffect(string effectName) { }

    [AnimationEvent]
    public void ApplyDamage(int damage) { }

    [AnimationEvent]
    public void SetAnimationState(CharacterState state) { }  // Enum parameter
}

Sprite Atlas Tools

Sprite Atlas Generator

Menu: Tools > Wallstop Studios > Unity Helpers > Sprite Atlas Generator

Purpose: Comprehensive tool for creating and managing Unity Sprite Atlases with regex-based sprite selection, label filtering, and automated packing.

Key Features:

Configuration Asset: Create configurations via Assets > Create > Wallstop Studios > Unity Helpers > Scriptable Sprite Atlas Config

ScriptableSpriteAtlas Configuration:

Sprite Sources:
- spritesToPack: Manually added sprites (always included)
- sourceFolderEntries: Define folders with regex/label filters

Source Folder Entry Options:
- folderPath: Folder to scan (relative to Assets/)
- selectionMode: Regex | Labels | Both
- regexes: List of regex patterns (all must match - AND logic)
- regexAndTagLogic: How to combine regex and labels (And/Or)
- labelSelectionMode: All | AnyOf
- labels: Asset labels to filter by

Output Atlas Settings:
- outputSpriteAtlasDirectory: Where to save .spriteatlas
- outputSpriteAtlasName: Name of atlas file

Packing Settings:
- maxTextureSize: 32-16384 (power of 2)
- enableRotation: Allow sprite rotation for better packing
- padding: Pixels between sprites (0-32)
- enableTightPacking: Optimize packing density
- enableAlphaDilation: Dilate alpha edges
- readWriteEnabled: Enable Read/Write on atlas texture

Compression Settings:
- useCrunchCompression: Enable crunch compression
- crunchCompressionLevel: 0-100 quality
- compression: Compressed/CompressedHQ/Uncompressed

Typical Workflow:

1. Open Sprite Atlas Generator
2. Click "Create New Config in 'Assets/Data'"
3. Configure the new atlas:
   a. Set output name and directory
   b. Click "Add New Source Folder Entry"
   c. Select folder containing sprites
   d. Add regex patterns (e.g., "^character_.*\\.png$")
   e. Or/and add labels for filtering
   f. Configure packing settings (texture size, padding, etc.)
4. Click "Scan Folders for '[config name]'"
5. Review sprites to add/remove
6. Click "Add X Sprites" to populate the list
7. Click "Generate/Update '[atlas name].spriteatlas' ONLY"
8. Click "Pack All Generated Sprite Atlases" to pack textures

Example Configurations:

Character Sprites Atlas:

folderPath: Assets/Sprites/Characters
selectionMode: Regex
regexes: ["^player_.*\\.png$", ".*_idle_.*"]
maxTextureSize: 2048
padding: 4
compression: CompressedHQ

UI Icons by Label:

folderPath: Assets/Sprites/UI
selectionMode: Labels
labelSelectionMode: AnyOf
labels: ["icon", "ui"]
maxTextureSize: 1024
padding: 2

Combined Regex + Labels:

folderPath: Assets/Sprites/Effects
selectionMode: Regex | Labels
regexes: ["^vfx_.*"]
labels: ["particle"]
regexAndTagLogic: And
maxTextureSize: 2048

Advanced Features:

Scan and Preview:

Source Sprite Utilities:

Batch Operations:

Best For:

Tips:

Common Issues:

Visual Reference

Sprite Atlas Generator window showing regex configuration

Sprite Atlas Generator with regex-based sprite selection and packing settings

Sprite Atlas Generator scan results showing sprites to add

Scanning folders and previewing which sprites will be added to the atlas


Validation & Quality Tools

Prefab Checker

Menu: Tools > Wallstop Studios > Unity Helpers > Prefab Checker

Purpose: Comprehensive prefab validation to detect configuration issues before runtime.

Validation Checks:

Check Description Severity
Missing Scripts Detects broken MonoBehaviour references Critical
Nulls in Lists/Arrays Finds null elements in serialized collections High
Missing Required Components Validates [RequireComponent] dependencies Critical
Empty String Fields Identifies unset string fields Medium
Null Object References Finds unassigned UnityEngine.Object fields High
Only if [ValidateAssignment] Restricts null checks to annotated fields Configurable
Disabled Root GameObject Flags inactive prefab roots Medium
Disabled Components Reports disabled Behaviour components Low

Typical Validation Workflow:

// Before committing prefab changes:
1. Open Prefab Checker
2. Enable relevant checks (especially Missing Scripts, Required Components)
3. Add "Assets/Prefabs" folder
4. Click "Run Checks"
5. Review console output (click to select problematic prefabs)
6. Fix reported issues
7. Re-run checks to verify
8. Commit changes

CI/CD Integration:

// Can be scripted for automated builds
- Run validation on changed prefab folders
- Parse console output for errors
- Fail build if critical issues found

Best Practices:

Performance: Uses cached reflection for fast repeated checks.

Best For:

Visual Reference

Prefab Checker window showing validation check options

Prefab Checker with configurable validation checks and folder selection

Prefab Checker results in console showing detected issues

Console output showing detected prefab issues with clickable links


Unity Method Analyzer

Menu: Tools > Wallstop Studios > Unity Helpers > Unity Method Analyzer

Purpose: Detect inheritance issues and Unity lifecycle method errors across your entire C# codebase before they cause runtime bugs.

📖 Full Documentation: Unity Method Analyzer Guide

Key Features:

What It Detects:

Issue Type Example
Missing override keyword Hiding base method instead of overriding
Wrong Unity method signature OnCollisionEnter(Collider c) instead of OnCollisionEnter(Collision c)
Shadowed lifecycle methods Both base and derived class have private void Start()
Static lifecycle methods static void Awake() won’t be called by Unity

Quick Start:

1. Open Unity Method Analyzer
2. Add source directories (e.g., Assets/Scripts)
3. Click "Analyze Code"
4. Review issues grouped by file, severity, or category
5. Double-click to navigate to problematic code
6. Export report for team review or CI/CD

Visual Demo

Unity Method Analyzer window showing detected issues

The analyzer scanning a project and displaying categorized issues

Suppressing Warnings:

For test code or intentional patterns, use [SuppressAnalyzer]:

[SuppressAnalyzer("Test fixture for analyzer validation")]
public class TestClassWithIntentionalIssues : BaseClass
{
    public void HiddenMethod() { }  // Won't trigger warning
}

Best For:


Custom Component Editors

These custom inspectors enhance Unity components with additional functionality and convenience features.

MatchColliderToSprite Editor

Component: MatchColliderToSprite

Purpose: Provides a button in the inspector to manually trigger collider-to-sprite matching.

Features:

When to Use:


PolygonCollider2DOptimizer Editor

Component: PolygonCollider2DOptimizer

Purpose: Custom inspector for optimizing PolygonCollider2D point counts with configurable tolerance.

Features:

How It Works:

  1. Adjust tolerance slider (lower = more accurate, higher = simpler)
  2. Click “Optimize” to simplify polygon points
  3. Collider updates with a reduced point count

Best For:

Tolerance Guide:


EnhancedImage Editor

Component: EnhancedImage (extends Unity’s Image)

Purpose: Extended inspector for EnhancedImage with HDR color support and shape mask configuration.

Additional Properties:

Features:

Material Detection:

Shape Mask:

HDR Color:

Best For:

Workflow:

1. Add EnhancedImage component to UI GameObject
2. If yellow "Fix Material" button appears, click it
3. Configure HDR Color for glow/intensity
4. Assign Shape Mask texture if needed
5. Shader must expose _ShapeMask property

Icon Customization:


Property Drawers & Attributes

Custom property drawers enhance the inspector with conditional display, validation, and specialized input fields.

WInLineEditor Property Drawer

Attribute: [WInLineEditor]

Purpose: Embed the inspector for object references (ScriptableObjects, Materials, Components, Textures, etc.) directly below the field so you can edit configuration without losing context.

Modes (WInLineEditorMode):

Options: tune the presentation with constructor parameters:

WInLineEditor respects the Inline Editors defaults inside Unity Helpers Settings. Leave the mode argument unset to inherit the global foldout behaviour, or supply a WInLineEditorMode per field to override it. By default, Inline Editors start collapsed to mirror collapsible WGroups, so [WInLineEditor] without a mode expands only when you opt into a different setting.

Examples:

public class AbilityConfig : ScriptableObject
{
    public string displayName;
    public float cooldown;
}

public class AbilityDatabase : ScriptableObject
{
    [WInLineEditor] public AbilityConfig defaultConfig;

    [WInLineEditor(
        WInLineEditorMode.FoldoutCollapsed,
        inspectorHeight: 180f,
        drawPreview: true,
        previewHeight: 64f)]
    public Texture2D abilityIcon;

    [WInLineEditor(
        WInLineEditorMode.AlwaysExpanded,
        inspectorHeight: 220f,
        drawObjectField: false,
        enableScrolling: false)]
    public AbilityConfig sharedTemplate;
}

Features:

Animation Settings:

Foldout animations are controlled via Unity Helpers Settings (Edit > Project Settings > Unity Helpers):

using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;

public class AbilityConfig : ScriptableObject
{
    public string abilityName;
    public Sprite icon;
    public float cooldown;
}

public class WInLineEditorExample : MonoBehaviour
{
    // Animation applies to foldout modes only
    [WInLineEditor(WInLineEditorMode.FoldoutCollapsed)] // Animated
    public AbilityConfig animatedFoldout;

    [WInLineEditor(WInLineEditorMode.AlwaysExpanded)] // No animation (always visible)
    public AbilityConfig alwaysVisible;
}

See also: Inspector Settings Reference for complete settings documentation.

Visual Reference

WInLineEditor showing embedded ScriptableObject inspector and expansion

WInLineEditor with embedded inspector for a ScriptableObject reference with foldout and collapse transitions


WShowIf Property Drawer

Attribute: [WShowIf]

Purpose: Conditionally show/hide fields in inspector based on boolean fields or enum values.

Syntax:

[WShowIf(nameof(fieldName))]
[WShowIf(nameof(fieldName), inverse = true)]
[WShowIf(nameof(fieldName), expectedValues: new object[] { value1, value2 })]
[WShowIf(nameof(numericField), WShowIfComparison.GreaterThan, 10)]
[WShowIf(nameof(stringField), WShowIfComparison.IsNotNullOrEmpty)]
[WShowIf(nameof(parentField) + "." + nameof(ChildType.someFlag))]

WShowIfComparison.Unknown exists only for backward compatibility and is marked obsolete; always choose an explicit comparison mode.

Examples:

Boolean Condition:

public bool enableFeature;

[WShowIf(nameof(enableFeature))]
public float featureIntensity;

[WShowIf(nameof(enableFeature), inverse = true)]
public string disabledMessage;

Enum Condition:

public enum Mode { Simple, Advanced, Expert }
public Mode currentMode;

[WShowIf(nameof(currentMode), expectedValues = new object[] { Mode.Advanced, Mode.Expert })]
public int advancedSetting;

Multiple Values:

using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Serialization;
using WallstopStudios.UnityHelpers.Core.Attributes;
using WallstopStudios.UnityHelpers.Core.DataStructure.Adapters;
using WallstopStudios.UnityHelpers.Editor.Sprites;

public class SelectionModeExample : MonoBehaviour
{
    public SpriteSelectionMode selectionMode;

    [WShowIf(
        nameof(selectionMode),
        expectedValues = new object[]
        {
            SpriteSelectionMode.Regex,
            SpriteSelectionMode.Regex | SpriteSelectionMode.Labels,
        }
    )]
    public List<string> regexPatterns;

    [FormerlySerializedAs("regexPatterns")]
    [WShowIf(
        nameof(selectionMode),
        expectedValues = new object[]
        {
            SpriteSelectionMode.Regex,
            SpriteSelectionMode.Regex | SpriteSelectionMode.Labels,
        }
    )]
    public SerializableHashSet<string> regexPatterns1;

    [WShowIf(
        nameof(selectionMode),
        expectedValues = new object[]
        {
            SpriteSelectionMode.Regex,
            SpriteSelectionMode.Regex | SpriteSelectionMode.Labels,
        }
    )]
    public SerializableDictionary<int, string> regexPatterns2;

    public bool someOtherField;
}

Features:

Best For:

Visual Reference

WShowIf showing field visibility changing based on toggle

Field appears/disappears based on enum toggle state


StringInList Property Drawer

Attribute: [StringInList]

Purpose: Display string or int fields as dropdown with predefined options.

Syntax:

// Static array
[StringInList("Option1", "Option2", "Option3")]
public string selectedOption;

// Method reference
[StringInList(typeof(MyClass), nameof(MyClass.GetOptions))]
public string dynamicOption;

// With int field
[StringInList("Low", "Medium", "High")]
public int priorityIndex;

Dynamic Options Example:

using WallstopStudios.UnityHelpers.Core.Helper;

public class MySettings
{
    [StringInList(typeof(Helpers), nameof(Helpers.GetAllSpriteLabelNames))]
    public List<string> selectedLabels;
}

Features:

Best For:

using System.Collections.Generic;
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;

public class StringInListExample : MonoBehaviour
{
    [StringInList(typeof(StringInListExample), nameof(GetValues))]
    public string value;

    private IEnumerable<string> GetValues()
    {
        yield return "A";
        yield return "B";
        yield return "C";
        yield return "D";
    }
}

Visual Reference

StringInList dropdown with search and pagination

StringInList dropdown showing search filtering and pagination

using System.Collections.Generic;
using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;

public class StringInListExample : MonoBehaviour
{
    [StringInList(typeof(StringInListExample), nameof(GetValues))]
    public string value;

    private IEnumerable<string> GetValues()
    {
        yield return "A";
        yield return "B";
        yield return "C";
        yield return "D";
    }
}

Visual Reference

StringInList with list field showing add/remove/reorder

StringInList on a List field with per-element dropdowns and drag reordering


IntDropdown Property Drawer

Attribute: [IntDropdown]

Purpose: Display int fields as dropdown with specific integer options.

Syntax:

[IntDropdown(32, 64, 128, 256, 512, 1024, 2048, 4096, 8192)]
public int textureSize;

[IntDropdown(0, 2, 4, 8, 16, 32)]
public int padding;

Features:

Best For:

Common Use Cases:

using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;

public class IntDropDownExample : MonoBehaviour
{
    // Texture sizes (power of 2)
    [IntDropDown(32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384)]
    public int maxTextureSize = 2048;

    // Padding options
    [IntDropDown(0, 2, 4, 8, 16, 32)]
    public int spritePadding = 4;

    // Quality levels
    [IntDropDown(0, 1, 2, 3, 4, 5)]
    public int qualityLevel = 3;
}

Visual Reference

IntDropDown showing texture size options

IntDropDown for texture sizes showing power-of-two options


WValueDropDown Property Drawer

Attribute: [WValueDropDown]

Purpose: Generic dropdown for any type with fixed values or provider methods. More flexible than StringInList or IntDropdown — supports all primitive types, custom classes, and dynamic providers.

Syntax:

// Fixed primitive values
[WValueDropDown(0, 25, 50, 100)]
public int staminaThreshold = 50;

[WValueDropDown(0.5f, 1.0f, 1.5f, 2.0f)]
public float damageMultiplier = 1.0f;

[WValueDropDown("Easy", "Normal", "Hard", "Insane")]
public string difficulty = "Normal";

// Static provider method
[WValueDropDown(typeof(PowerUpLibrary), nameof(PowerUpLibrary.GetAvailablePowerUps))]
public PowerUpDefinition selectedPowerUp;

// Instance provider method (context-aware)
[WValueDropDown(nameof(GetAvailableOptions), typeof(string))]
public string selectedOption;

Features:

Best For:

Custom Types Example:

using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;
using System.Collections.Generic;

[System.Serializable]
public class Preset
{
    public string name;
    public float value;

    public override string ToString() => name;  // Used for dropdown label
}

public class Config : MonoBehaviour
{
    [WValueDropDown(typeof(Config), nameof(GetPresets))]
    public Preset selectedPreset;

    public static IEnumerable<Preset> GetPresets()
    {
        return new[]
        {
            new Preset { name = "Low", value = 0.5f },
            new Preset { name = "Medium", value = 1.0f },
            new Preset { name = "High", value = 2.0f },
        };
    }
}

Instance Provider Example:

public class DynamicOptions : MonoBehaviour
{
    public string prefix = "Option";
    public int optionCount = 5;

    [WValueDropDown(nameof(GetAvailableOptions), typeof(string))]
    public string selectedOption;

    private IEnumerable<string> GetAvailableOptions()
    {
        for (int i = 1; i <= optionCount; i++)
        {
            yield return $"{prefix}_{i}";
        }
    }
}

Visual Reference

WValueDropDown with predefined values

WValueDropDown showing predefined integer, float, and string values

For more detailed documentation, including all constructor forms, see Inspector Selection Attributes.


WReadOnly Property Drawer

Attribute: [WReadOnly]

Purpose: Display fields as read-only in the inspector (grayed out, non-editable).

Syntax:

using WallstopStudios.UnityHelpers.Core.Attributes;

[WReadOnly]
public int calculatedValue;

[WReadOnly]
public string currentState;

Features:

Best For:

Example:

using UnityEngine;
using WallstopStudios.UnityHelpers.Core.Attributes;

public class WReadOnlyExample : MonoBehaviour
{
    public int baseHealth = 100;
    public int healthBonus = 0;

    [WReadOnly]
    public int totalHealth;

    private void OnValidate()
    {
        totalHealth = baseHealth + healthBonus;
    }
}

Visual Reference

WReadOnly showing grayed-out calculated value in inspector

WReadOnly field showing totalHealth as a non-editable calculated value

For detailed documentation on validation attributes, see Inspector Validation Attributes.


Automation & Utilities

ScriptableObject Singleton Creator

Type: Automatic (runs on editor load) Menu: N/A (automatic) - Uses [InitializeOnLoad]

Purpose: Automatically creates and maintains singleton ScriptableObject assets.

See the base API guide for details on ScriptableObjectSingleton<T> usage, scenarios, and Odin compatibility: Singleton Utilities.

How It Works:

1. Runs when Unity editor starts
2. Scans all ScriptableObjectSingleton<T> derived types
3. Creates missing assets in Assets/Resources/
4. Moves misplaced singletons to correct locations
5. Respects [ScriptableSingletonPath] attribute

Usage Example:

using WallstopStudios.UnityHelpers.Utils;
using WallstopStudios.UnityHelpers.Core.Attributes;

// Define singleton:
public class GameSettings : ScriptableObjectSingleton<GameSettings>
{
    public float masterVolume = 1.0f;
    public bool enableVSync = true;
}

// Optional custom path:
[ScriptableSingletonPath("Settings/Audio")]
public class AudioSettings : ScriptableObjectSingleton<AudioSettings>
{
    public float musicVolume = 0.8f;
}

// Assets created automatically:
// - Assets/Resources/GameSettings.asset
// - Assets/Resources/Settings/Audio/AudioSettings.asset

// Access at runtime:
float volume = GameSettings.Instance.masterVolume;

Folder Structure:

Assets/
  Resources/
    GameSettings.asset              (no path attribute)
    Settings/
      Audio/                        ([ScriptableSingletonPath("Settings/Audio")])
        AudioSettings.asset

Best For:

Customization:


Sprite Label Processor

Type: Automatic asset processor Menu: N/A (automatic) - Uses AssetPostprocessor

Purpose: Automatically maintains a cache of all sprite labels in the project for fast lookup in editor tools.

How It Works:

  1. Monitors sprite asset imports/reimports (PNG, JPG, JPEG)
  2. Detects changes to asset labels on sprites
  3. Updates global sprite label cache automatically
  4. Provides a cached label list to tools like Sprite Atlas Generator

What Gets Cached:

Performance Benefits:

Runtime Usage:

using WallstopStudios.UnityHelpers.Core.Helper;

// Access cached sprite labels
string[] labels = SpriteLabelCache.GetAllLabels();

Request Script Recompilation

Menu: Tools > Wallstop Studios > Unity Helpers > Request Script Recompilation Shortcut: Ctrl/Cmd + Alt + R (configurable in Unity’s Shortcut Manager)

Purpose: Manually trigger Unity script recompilation without needing to modify files or restart the editor.

Visual Reference

Request Script Recompilation menu item

Request Script Recompilation shortcut

Key Features:

When to Use:

Common Workflow:

1. Run external code generator
2. Press Ctrl+Alt+R (or use menu item)
3. Wait for Unity to recompile scripts
4. Continue working with updated code

Project Settings: Unity Helpers

Menu: Edit > Project Settings > Wallstop Studios > Unity Helpers

Purpose: Centralized configuration for Unity Helpers features, including buffer settings, pagination defaults, and inspector behavior.

Visual Reference

Project Settings panel for Unity Helpers Centralized configuration panel in Unity’s Project Settings

Key Settings:

Coroutine Wait Buffer Defaults

Configure default behavior for WaitForSeconds, WaitForFixedUpdate, and other yield instructions:

// Settings affect runtime buffer pool behavior:
- Quantization: How yield times are rounded (e.g., 0.1f rounds to nearest 0.1)
- Entry Caps: Maximum number of cached wait instructions per type
- LRU Mode: Least-recently-used eviction when caps are exceeded

Impact:

Generated Asset: Resources/WallstopStudios/UnityHelpers/UnityHelpersBufferSettings.asset

Inspector Pagination Defaults

When to Adjust:


Runtime Usage:

using WallstopStudios.UnityHelpers.Core.Helper;

// Get all known sprite labels
string[] allLabels = Helpers.GetAllSpriteLabelNames();

// Used internally by StringInList attribute
[StringInList(typeof(Helpers), nameof(Helpers.GetAllSpriteLabelNames))]
public List<string> selectedLabels;

Cache Updates:

Best For:

Technical Notes:


Attribute Metadata Cache Generator

Type: Automatic (runs on editor load and domain reload)

Purpose: Pre-generate attribute system metadata at edit time to eliminate runtime reflection overhead. The cache is automatically regenerated when scripts change. You can manually refresh it via the “Purge & Refresh Cache” button in the AttributeMetadataCache asset inspector.

What Gets Cached:

Performance Benefits:

Runtime Usage:

// Cache is loaded automatically:
AttributeMetadataCache cache = AttributeMetadataCache.Instance;

// Get all known attribute names:
string[] allAttributes = cache.AllAttributeNames;

// Check type for attribute fields:
TypeFieldMetadata metadata = cache.GetMetadataForType(typeof(MyAttributesComponent));
if (metadata != null)
{
    foreach (string fieldName in metadata.AttributeFieldNames)
    {
        Debug.Log($"Found attribute field: {fieldName}");
    }
}

// Query relational component metadata:
RelationalTypeMetadata relational = cache.GetRelationalMetadataForType(typeof(MyComponent));

Cache Regenerates:

Best For:


Editor Utilities

Type: Static utility class Namespace: WallstopStudios.UnityHelpers.Editor.Utils

Purpose: Helper methods for Unity Editor operations.

Available Methods:

GetCurrentPathOfProjectWindow()

Gets the currently selected folder in Unity’s Project window.

// In an editor window or wizard:
string currentFolder = EditorUtilities.GetCurrentPathOfProjectWindow();
if (!string.IsNullOrEmpty(currentFolder))
{
    string newAssetPath = $"{currentFolder}/NewGeneratedAsset.asset";
    AssetDatabase.CreateAsset(myAsset, newAssetPath);
}
else
{
    // Fallback to default location
    AssetDatabase.CreateAsset(myAsset, "Assets/NewGeneratedAsset.asset");
}

Returns: Asset-relative path (e.g., “Assets/Scripts/Editor”) or empty string.

Use Cases:

Technical Notes:

Best For:


Quick Reference

Tools by Category

Image Processing:

Animation:

Sprite Atlases:

Quality & Validation:

Custom Editors:

Property Drawers:

Automation:

Utilities:


All Menu Items

Tools > Wallstop Studios > Unity Helpers:

Assets > Create > Wallstop Studios > Unity Helpers:


Common Workflows

Setting Up New Sprites

1. Import sprites to Assets/Sprites/
2. Use Sprite Cropper to remove padding
3. Use Texture Settings Applier:
   - Filter Mode: Bilinear
   - Wrap Mode: Clamp
   - Compression: CompressedHQ
4. Use Sprite Settings Applier:
   - Set consistent PPU (e.g., 32 or 64)
5. Use Sprite Pivot Adjuster for consistent alignment

Creating and Editing Animations

1. Prepare sprite frames in folder
2. Open Sprite Animation Editor
3. Click "Browse Clips (Multi)..." if clips exist, or
4. Use Animation Creator to generate from sprites
5. Edit in Sprite Animation Editor:
   - Adjust frame order via drag-drop
   - Set appropriate FPS
6. Save clips
7. (Optional) Add animation events:
   a. Open AnimationEvent Editor
   b. Drag Animator to "Animator Object" field
   c. Select animation clip
   d. Add events at specific frames
   e. Configure event methods and parameters
   f. Save changes

Creating Sprite Atlases

1. Create atlas config:
   a. Open Sprite Atlas Generator
   b. Click "Create New Config in 'Assets/Data'"
   c. Name your atlas configuration
2. Configure source folders:
   a. Click "Add New Source Folder Entry"
   b. Select folder containing sprites
   c. Add regex patterns (e.g., "^character_.*")
   d. Or add labels for filtering
3. Set packing options:
   - Max texture size (2048 recommended)
   - Padding (4px default)
   - Compression settings
4. Preview changes:
   a. Click "Scan Folders"
   b. Review sprites to add/remove
5. Generate atlas:
   a. Click "Add X Sprites" if satisfied
   b. Click "Generate/Update .spriteatlas ONLY"
   c. Click "Pack All Generated Sprite Atlases"

Pre-Commit Validation

1. Open Prefab Checker
2. Enable all critical checks:
   - Missing Scripts ✓
   - Missing Required Components ✓
   - Null Object References ✓
3. Add changed prefab folders
4. Click "Run Checks"
5. Fix all reported issues
6. Re-run to verify
7. Commit changes

Optimizing Textures for Build

1. Use Sprite Cropper on all sprites (reduces memory)
2. Use Texture Settings Applier with:
   - Appropriate compression for platform
   - Crunch compression enabled
   - Proper max texture sizes
3. Review build report for texture memory usage
4. Iterate on settings as needed

Keyboard Shortcuts & Tips

Sprite Animation Editor:

Prefab Checker:

General:


Performance Considerations

Sprite Cropper:

Texture Settings Applier:

Prefab Checker:

Attribute Metadata Cache:


Troubleshooting

Tool window won’t open:

Settings not applying:

Cache not regenerating:

Prefab Checker missing issues:


Best Practices

Organization:

Performance:

Quality:

Workflow:

Compilation helpers:


Additional Resources

Attributes System:

Related Components:


Version Information

Document Version: 2.0 Package: com.wallstop-studios.unity-helpers Last Updated: 2025-10-08

What’s New in v2.0:


Summary

This package provides 20+ editor tools across multiple categories:

14 Editor Windows/Wizards:

3 Custom Component Editors:

4 Property Drawers:

3 Automated Systems:

1 Utility Library:

All tools are designed to work together seamlessly and follow consistent design patterns for ease of use.


For questions, issues, or feature requests, please contact the Wallstop Studios team.

MultiFile Selector (UI Toolkit)