Class SampleScreenshot

Namespace
TDMaker.Editor
Assembly
TDMaker.Editor.dll

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.

[InitializeOnLoad]
public static class SampleScreenshot
Inheritance
SampleScreenshot
Inherited Members

Methods

Capture()

Starts a capture; usable with -executeMethod (the editor exits when done).

public static void Capture()