Namespace TDMaker.Editor

Classes

AudioCuePreview

Previews AudioCues in the editor (edit mode or play mode) through one hidden AudioSource: a random clip and pitch per play, like AudioCuePlayer. Shared by inspectors and editor windows (the Audio section of authoring tools).

BuildSlotAuthoringEditor

Inspector and scene handles for BuildSlotAuthoring: rally point handle, preview tower range and rally radius (simulation ellipse), and a warning when the rally point lies outside the rally radius.

CampaignAssetEditor

Inspector of CampaignAsset: a map view of the world map picture with the level points and their unlock roads (arrows from prerequisites, dashed for branches, red for problems). Click a point to select it, drag it to move it, click an empty spot to move the selected point there, drop Level assets on the map to add them, right-click a point for more. Below: the ordered level list, the selected level's settings and the validation results. Every edit is undoable.

CampaignEditing

Editing helpers for CampaignAsset shared by the inspector, the New Level wizard and tests.

CombatMath

Editor-side estimates of combat numbers. Mirrors the simulation's reduction rules (physical, magical, explosion/electric at half physical, poison, true) but ignores rounding, status effects and incoming-damage multipliers, so values are approximate ("≈").

EditorWindowLayout

Predictable initial utility-window placement without restoring a full-screen layout.

EnemyAssetEditor

Grouped inspector for EnemyAsset with effective HP and damage estimates.

LevelAssetEditor

Inspector actions for level assets.

LevelAuthoringEditor

Inspector actions for scene level authoring.

LevelContext

Finds the level a tower belongs to, so editor previews use the level's rules (for example the sale refundShare) instead of per-tower legacy values.

LevelDryRun

Headless content check: bakes a level and runs the simulation without rendering. The undefended run calls every wave as early as possible with no towers (shows total threat); the fortified run builds and upgrades towers on every slot with unlimited gold, buys every tower ability, spawns the level's heroes (moving them to the front enemy and spending skill points), and casts ready spells at the leading enemy (checks that every build, branch, rally, ability, move and cast is accepted and that the level can be completed). The budget pass plays with the level's real starting gold: it starts the first wave, lets later waves arrive on their timers and spends gold greedily (builds slots in list order, cycling the buildable towers, then the cheapest upgrade, branch or ability rank), with the same hero and spell assistance (checks that a sensible defense wins).

LevelSceneBuilder

Builds a playable scene from caller-owned assets. No sample content is loaded unless explicitly supplied by the caller.

MapBackgroundPreview

Edit-mode stand-in for the painted map: a hidden, never-saved sprite object that shows the level's ground art in the Scene view while the Map Editor is open (the Level View only builds the ground in Play mode). It is removed before Play mode, assembly reloads and when the Map Editor closes, so scenes and builds never contain it.

MapEditing

Undoable level-authoring operations behind the Map Editor (and usable from your own editor scripts): edit points of curve and polyline paths, create/delete/duplicate/align build slots with automatic rally points, path order, painted background setup and baking scene geometry into a LevelAsset.

MapEditorWindow

Map Editor (Tools > 2D Tower Defense Maker > Map Editor): turns a painted map into a level. Drop a sprite or texture as the background (the camera bounds fit it), draw smooth curved paths with a few clicks, place build slots with automatic rally points, set where each entrance's wave-call button appears, then Validate, Dry Run and Bake — all with Undo and in the Scene view (2D).

MapSceneGUI

Scene-view drawing and handles shared by the Map Editor and the Path Authoring inspector: road band (lanes plus the painted-road padding), every sub-lane, direction arrows, entry/exit markers, wave-call buttons and edit-point handles for curve and polyline paths.

NewAssetDialog

Small modal dialog of the Unit Workshop's New menu: asks for the asset name and the folder it is created in. The folder defaults to the current user level's Data folder, then a user content folder (DefaultFolder, or the last folder picked), never to the package's own sample folders unless the user picks one explicitly.

NewLevelBuilder

Headless core of Tools > 2D Tower Defense Maker > New Level: creates a level folder with a Level asset, a Wave Set, starter units (sample kit or Unit Workshop presets), a HUD theme and a sprite material, and a scene built by the sample scene builder (Simulation Runner, Level Authoring, one path across the frame, six build slots with rally points on the road, camera, Game HUD, Level View, audio and music players). The result passes the Project Validator and plays in the Dry Run: lost without towers, won with a defense. Usable from tests and -executeMethod; the window only collects the settings.

NewLevelResult

What Create(NewLevelSettings) made.

NewLevelSettings

Inputs of Create(NewLevelSettings).

NewLevelWizardWindow

Tools > 2D Tower Defense Maker > New Level: collects a level name, a folder, an optional painted map, the starter content and the number of waves, then runs Create(NewLevelSettings). Afterwards the new scene is open, its Level is selected, the Map Editor is open on the path tool and the window shows the next steps.

OnlineDocumentation

Online manual entry points shared by the editor tools.

PathAuthoringEditor

Inspector and scene editor for PathAuthoring: drag points, Shift+click to add or insert, Ctrl+click to delete, Delete/Ctrl+D/F on the selected point, optional snapping, all sub-lanes, direction arrows, entry/exit markers, per-point lane width handles and build-slot range context.

PathEditing

Undoable point operations that keep per-point lane widths and entry/exit indices in sync.

ProjectValidator

Scans 2D Tower Defense Maker content in the project and open scenes: missing references, duplicate template ids, path and lane problems, waves referencing missing enemies or paths, upgrade cycles and unreachable upgrade tiers, level bake failures, missing TextMesh Pro Essential Resources, string table problems and campaign problems (missing levels, duplicate keys, unlock cycles, levels that can never open).

RangePreview

Scene-view drawing of range ellipses using exactly the simulation's shape (RangeShape), with the range Y scale resolved from the open scene's level and runner.

SampleAudio

Assigns the optional sample audio (Assets/TDMaker/Samples/Audio/Sfx/<key>.ogg and Music/<key>.ogg) to sample cues by key. A missing file leaves its cue empty, so sample generation is deterministic with or without the audio. The key tables are public so tests (and buyers copying the scheme) can check them.

SampleBrowserWindow

Separate entry point for optional examples and the complete sample game.

SampleCatalog

Optional sample locations. The Maker works without these assets or their generator.

SampleContentGenerator

Generates the "Basic" sample: projectiles, enemies, soldiers, four tower families, five waves on two multi-lane paths, status effects (slow, poison, stun, rally buff, shield ward), purchasable abilities on final branches (including a chain-lightning ability, a knockback ability, a channelled beam, a path-transfer rift and a trap-laying barracks), a support enemy with a shield cast and a permanent pulse-only healing aura, an armored enemy that reflects damage, one hero (with life steal and a trap skill), two spells (reinforcement and area strike), a level asset and a ready-to-play scene. All content is original and uses hand-authored vector art with procedural fallbacks; the scene uses the uGUI GameHud with a theme asset, a fitted camera, a painted ground and the IMGUI HUD as an F1 debug overlay. Re-running updates the existing assets in place. The same run also generates the Crossroads and Winding Pass levels (which reuse the Basic towers, enemies and hero) and the Demo scene (title, level select, pause and result flow over all three levels), plus the English and Korean sample string tables (Samples/Text) that every sample scene's Game Settings use, and the dynamic Korean fallback font asset of the sample HUD themes (Samples/Fonts).

SampleScreenshot

Plays the sample scene with a scripted run (build on every slot, upgrade, call waves early) and renders the main camera, HUD included, to a PNG (for store-page drafts). Works from the menu and from batch mode (-batchmode -executeMethod TDMaker.Editor.SampleScreenshot.Capture, without -quit: the editor exits by itself). Needs a graphics device, so it does nothing under -nographics. Options: -tdmSeconds N (game seconds, default 50), -tdmWidth/-tdmHeight (default 1920x1080), -tdmOut folder (default .work/screenshots), -tdmScene path (default the Basic sample scene), -tdmName file (PNG name without extension), -tdmGold N (starting gold, default 4000), -tdmUpgradeEvery S (game seconds between scripted upgrades, default 1.5), -tdmCallEvery S (game seconds between early wave calls, default 8) -tdmSlots N (build on the first N pads only, default all), -tdmNoHud (map only, for key art) and -tdmShot mode: beam (default: waits for a channelled beam or chain lightning), barracks (waits for soldiers blocking several enemies), hero (sends the hero to the fight and casts every ready spell just before the shot) or worldmap (alias levelselect: the demo scene's world map with preview progress in a throw-away slot; use with the demo scene) or title (the title and its language buttons), or slots (the demo scene's save slot page over the same throw-away store) or shop (the world map's star-upgrade shop over the same throw-away slot, with a few ranks bought and one rank's tooltip shown). -tdmMenu build opens the build menu on the first pad left empty by -tdmSlots instead of a tower panel; -tdmHidePause keeps the frozen capture from showing the paused state. -tdmDemoLevel N starts battle N of the demo scene through its flow (instead of driving the scene's own runner); -tdmPanel opens a tower panel in every shot mode (normally only the beam mode shows one). -tdmLang code (for example ko) shows the HUD and menus in that language of the scene's text tables (not saved to PlayerPrefs). Demo-scene modes levelinfo (the world map with a level's info panel open) and controls (the How to Play page); -tdmPauseMenu opens the pause menu in battle shots. Script errors logged during the run are counted and reported, so the batch run doubles as a play-mode smoke test.

ScenePreview

Shared scene-view context drawing for level authoring: build slots, rally points, rally radius and tower range ellipses (same shape the simulation tests). Toggles persist in editor preferences.

TDEditorGUI

Shared colors, styles and small IMGUI helpers for the 2D Tower Defense Maker editor tools.

TemplateInspectorBase

Base for grouped template inspectors: draws named property groups in persistent foldouts and any fields not claimed by a group under "Other", so new serialized fields never disappear from the inspector.

TextMeshProSetup

TextMesh Pro setup check. The HUD, damage numbers and sample menus use TextMesh Pro (part of the uGUI package in Unity 6), which needs its "Essential Resources" (default font asset, shaders, settings) imported into the project once. 2D Tower Defense Maker does not ship those resources. When they are missing this class logs one clear message per editor session, offers a one-click import in a dialog, and is available as Tools > 2D Tower Defense Maker > Import TMP Essential Resources (also used by the Validator).

TowerAssetEditor

Grouped inspector for TowerAsset with DPS vs armor, range ellipse and upgrade economics.

TowerTree

Project-wide queries and undoable edits on tower upgrade graphs.

UnitFrames

Bulk frame registration for the Unit Workshop: sorts sprite files into walk / idle / attack / hurt / death sequences by file name ("Orc_Walk_003", "walk (2)", "1_ATTACK_005", "goblinRun07", "Hit1"), fixes their texture import settings (single sprite, pivot at the feet, compressed) and writes the sequences into an ArtSet.Entry. Facing is never guessed; the author ticks Faces Left.

UnitMath

Unit Workshop numbers that follow the simulation's integer damage rules exactly (single-target hits without status effects or incoming multipliers): a hit rolls ceil(lerp(min, max, u)), projectile hits deal at least 1, the target keeps floor(rolled × (1 − reduction)) (soldiers: round(rolled − floor(rolled × reduction))), and the reduction is the matching defense minus pierce (explosion and electric use half the physical armor), clamped to [0, 1]. Ratio checks use the bands of the balance notes (new content starting points, not rules).

UnitPresets

Fills enemy, hero and soldier assets from ratios to a baseline (the project's median enemy and soldier, or built-in defaults). The ratios stay inside the bands of the balance notes: bounty density ×0.5–1.8 of the baseline, defenses in the low (0–0.2), medium (0.2–0.5) and strong (0.5–0.7) bands, hero experience steps ×1.1–1.6 after a first jump of ×2.5–3.5. They are a starting point; tune the result against your own towers.

UnitReferences

Reverse lookups for the Unit Workshop: which levels, waves, towers and other assets use a unit, projectile or effect.

UnitSandbox

The Unit Workshop's test range: a straight lane with the chosen towers beside it, and a wave of the unit under test (or, for heroes and soldiers, a wave of an opponent enemy against them). Run(Setup) plays it headless and deterministically (fixed seed, fixed tick); BuildLevel(Setup, List<Object>) returns the same level for the play-mode sandbox.

UnitSandbox.Result

Outcome of a headless run.

UnitSandbox.Setup

What to test.

UnitSandboxPlay

Play-mode sandbox of the Unit Workshop: opens a new unsaved scene (camera, runner, views, debug HUD), enters Play mode, then rebuilds the sandbox level in play mode (so nothing depends on objects surviving the domain reload), builds every tower and calls the wave. Nothing is written to disk. When Play mode stops, the scenes that were open before (saved scenes only) are opened again.

UnitWorkshopWindow

Unit Workshop (Tools > 2D Tower Defense Maker > Unit Workshop): enemies, heroes, soldiers, towers, projectiles, status effects and spells in one window. A searchable list (create from presets, duplicate, rename, delete, see who uses an asset), an animation preview (art set frames, Faces Left check, health bar, pivot, projectile flight), tabbed flat forms (basics, attacks, mechanic cards, effects and tags, look with bulk frame registration, hero growth, audio, engagement places), computed values that follow the simulation's damage rules, and a sandbox that plays the unit against chosen towers. Edits use Undo; several selected assets of one type are edited together.

UpgradeShopAssetEditor

Inspector of UpgradeShopAsset: a button to the Upgrade Shop window, the validation list and the default fields.

UpgradeShopWindow

Tools > 2D Tower Defense Maker > Upgrade Shop: edits an UpgradeShopAsset as a grid (tracks as columns, ranks as cells). Add, remove and reorder tracks and ranks, fill a track's prices from its first and last price with a back-loaded curve, edit the selected rank's effects (each with a readable summary), preview a tower's, unit's or spell's stats before and after the upgrades with the core rewriter, and see the validation problems. Every edit is undoable.

UpgradeTreeLayout

Hand-moved node positions of the Upgrade Tree window, per tree (root tower) and node (tower asset GUIDs). Editor-only: kept in UserSettings/ of the project, never in the assets or a build.

UpgradeTreeWindow

Graph view of a tower's upgrade tree (level 1 → 2 → 3 → branches). Each node shows its cost, cumulative investment and sell refund; clicking a node edits it inline. Nodes can grow new levels or branches, which are created as assets next to their parent. Drag a node to move it (the offset is kept per tree in the project's UserSettings, editor only); drag the empty canvas, or use the middle mouse button, to pan.

ValidationIssue

One problem found by ProjectValidator.

ValidatorWindow

Lists ProjectValidator issues with filters; click to select, double-click to open the right tool.

WaveSchedule

Mirrors the simulation's spawn schedule: a group's entries run back to back; an entry entered at s with start delay d, interval h and count n spawns at s+d+h … s+d+nh, waits one more interval, then the next entry is entered after the following gap.

WaveTimelineWindow

Timeline editor for WaveSetAssets. Each wave group is a row (sorted by path); each spawn entry is a bar from its start delay to its last wait, with a tick per spawn, colored by enemy. Drag bars to change delays, drag the right edge to change the interval (Shift: count), and edit the selection in the side inspector. With Follow on it shows the waves of the selected Wave Set / Level asset, or of the Level Authoring selected in (or present in) the open scene.

WelcomeWindow

Tools > 2D Tower Defense Maker > Welcome: first stop after importing the package – check (and import) the TextMesh Pro Essential Resources, start an independent new level, browse optional examples, and open the Unit Workshop or the Map Editor. Shown automatically the first time a project loads the package, and then at each editor start while Show on startup is on (per project).

WorkshopDirtyState

Remembers the last saved (clean) state of the assets an editor window edits, so that Undo back to that state clears the "modified" mark again (Unity keeps an asset dirty after Undo), and so that unsaved edits can be discarded on request. Snapshots are taken once per clean period (when an asset is first seen not dirty), not every frame.

WorkshopGUI

IMGUI helpers of the Unit Workshop: flat forms (nested data drawn as labelled blocks instead of nested foldouts, with enabled / useX switches hiding what is off), cards and small drawing utilities.

Structs

EntrySpan

Timing of one spawn entry inside its group, in seconds from the wave start.

LevelDryRun.PassResult

Outcome of one pass.

UnitFrames.Classified

Result of classifying one file name.

UnitFrames.Report

Summary of a bulk registration.

UnitMath.HeroRow

One growth row of a hero, as the bake computes it.

UnitMath.KillEstimate

Kill estimate of one tower tier against one unit.

UnitMath.Outlier

A value outside its usual band.

UnitPresets.Baseline

Reference numbers a preset scales.

UnitReferences.Use

One user of an asset.

UnitSandbox.SourceRow

Damage dealt by one source template.

WaveTotals

Aggregate numbers for a wave.

Enums

FrameAction

Animation a sprite file belongs to, guessed from its name by Classify(string).

IssueSeverity

Severity of a validation issue.

LevelDryRun.Pass

The three passes of a dry run.

MapEditorWindow.Tool

The Map Editor's Scene-view tools.

StarterContent

What the New Level wizard puts into a new level.

UnitPreset

Starting points offered by the Unit Workshop's New menu.

UnitSandbox.Verdict

How a sandbox run ended, judged by what reached the exit (the test level has spare lives, so its phase alone says little).

UnitWorkshopWindow.Kind

Asset families shown in the list.

UnitWorkshopWindow.MechanicCard

The mechanic cards the Mechanics tab can add (unit traits, on-hit payloads and timed action payloads).

UnitWorkshopWindow.Tab

Edit panel tabs.