Ana Sayfa / Uygulama Şablonları / Toy Legion Unity Merge Auto Battler

Toy Legion Unity Merge Auto Battler

Oyuncak askerler, formasyonlar, robot düşmanlar ve 40 seviye içeren Unity 6 birleştirme otomatik savaşçısı.

  • Yayın tarihi10 Kasım 2026
  • Paket içeriği.py, .json, .md, .cs, .prefab, .fbx
  • Son güncelleme10 Kasım 2026
  • Canlı demoVar
Toy Legion Unity Merge Auto Battler

Overview

Toy Legion is a complete portrait mobile game template for Unity 6 and URP: a merge auto-battler in which plastic toy soldiers fight wind-up tin robots and giant toy bosses. The player recruits tier-1 soldiers with coins, drags two identical soldiers together on a 5 x 4 deploy grid to merge them into the next tier, and arranges the formation: the front row takes the hits, so melee soldiers and Guardians stand in front, Blasters and Medics in the middle and Cannoneers at the back, while the level's first robot squad already waits up the lane. Battle! sends the army marching in formation down a toy play-mat lane through three robot squads. The fight runs by itself; the player's one active input is the commander ability, a round button that charges up during the battle. A victory pays coins and up to three stars, a lost battle still pays some coins, and the coins buy more recruits and permanent upgrades. The army is persistent: soldiers stay on the grid between battles, and knocked-out soldiers are back for the next one.

The twist is three decisions that work together. What to merge: two soldiers of the same class and tier make one soldier of the next tier with 2.3 times the HP and damage (a Legend has about 28 times the stats of a Recruit), and every tier is its own 3D model with new gear and its own plastic colour, from olive-green Recruits to golden Legends. Where to stand: robots attack the nearest soldier, Guardians draw robots within 4.5 m, Medics heal the most injured ally and Cannoneers lob corks with area damage from the back. When to call the commander ability: Paper Plane Strike sends three paper planes onto the densest robot cluster, Rally Horn gives every soldier +60% attack speed and +30% move speed for 6 seconds, and Bandage Drop heals every soldier still standing by 45% of its max HP and makes the army take no damage for 2 seconds.

The content: 4 worlds with their own diorama, robot tin colours, lighting, post-processing, music and ambience (Bedroom Carpet, Study Desk, Sandbox and the moonlit Attic), each with 10 levels: 8 normal levels, a Champion level (level 5: a giant crowned robot leads the last squad) and a boss level (level 10). 5 soldier classes (Brawler, Blaster, Guardian, Cannoneer, Medic) in 5 tiers (Recruit, Veteran, Elite, Hero, Legend), so 25 soldier models and 25 collectible cards. 5 robot types (Tin Walker, Bolt Shooter, Spring Boxer, Drum Tank, Spark Drone) and 4 giant toy bosses (Teddy Tyrant, Robo Rex, Jack the Box King, Clockwork Dragon) whose special attacks are telegraphed by ground decals that fill up before the hit, and who summon robots as they lose health. 3 commander abilities, 5 permanent upgrades with 20 to 25 levels each, Toy Box Siege (an endless mode with a boss every 10th wave), the Barracks collection with the Robot Files, 26 achievements, a 7-day daily reward, a shop with gem packs, Remove Ads and a Starter Pack, a free recruit for a rewarded ad every 3 minutes, revive after a defeat, x1 / x2 battle speed, a first-session tutorial and English and Turkish texts (about 420 strings).

The whole project is built from code. Editor builders turn C# tables into the data assets, prefabs, world dioramas, effects, UI, icons, sprites and both scenes, so Toy Legion > Build > Build Everything regenerates all of them, and every price, stat, reward, unlock level, timer and content table lives in one file, EconomyDefaults.cs. The battle is a pure C# simulation (deterministic, a fixed 1/30 s step, no physics engine, no allocations per step) drawn by views that interpolate between steps; the level generator builds every level deterministically from a squad budget, and the economy, the level generator and every meta service are plain C# tested in edit mode. Soldiers, robots and bosses are animated procedurally (rigid parts posed by code, no Animator on units), and the 30 particle effects are pooled. 14 own URP shaders, own small libraries for tweening, pooling, saving, localization, audio, haptics and random numbers, a signed JSON save with a backup file, CSV localization and native haptics (iOS plugin, Android vibrator).

Ads and in-app purchases sit behind interfaces with working mock services, so every flow runs in the editor without any SDK: rewarded ads for battle coins x2, endless coins x2, a revive, the free recruit, daily reward x2 and free gems; an interstitial when the player leaves a result panel (from the 4th finished battle, every 2nd battle, at most every 90 seconds, never within 90 seconds after a rewarded ad, never with Remove Ads); and three gem packs, Remove Ads and a Starter Pack as in-app purchases. An AdMob adapter compiles with the TOYLEGION_ADMOB define once the buyer installs the Google Mobile Ads Unity plugin v9 or newer, and a Unity IAP adapter compiles by itself when com.unity.purchasing 4.8 or a later 4.x version is installed (both are then switched on in one config asset).

426 edit mode test cases are included (Run All runs 424; the full 40-level economy pacing simulation, in which a bot plays the real formulas, and an allocation check of a busy battle are explicit and run on their own), plus 27 play mode tests: runtime tests, bot planner tests and smoke tests with a bot that plays the real scenes through the UI run by default; an explicit soak run in which the bot plays all 40 levels and 10 endless waves, and the 7 screenshot tour captures, can be run by hand.

All code was written for Toy Legion, and every asset is produced by generators that ship with it: the 89 FBX models by Blender 3.6 Python scripts (Tools/Blender), the 61 sound effects (92 files with variants), 7 music loops and 4 ambience loops by a Python synthesizer (Tools/Audio), the colour palette by Tools/Palette, the UI sprites, icons and app icon by C# editor code with signed distance functions, and the soldier cards, robot and boss portraits and world thumbnails by an icon baker that renders the 3D models. Third

Features

  • Portrait, one-handed merge + formation + auto-battle game with one active commander ability per battle; drag with one finger (click and drag with the mouse in the editor)
  • Persistent army on a 5 x 4 deploy grid (20 cells): recruit tier-1 soldiers with coins from five recruit buttons (Brawler and Blaster from the start, Guardian from level 4, Cannoneer from level 8, Medic from level 13; the price of a class grows with every recruit), drag a soldier onto an identical one to merge, onto an empty cell to move it, onto another soldier to swap; valid merge targets glow while dragging, a full grid says "Grid full - merge!"
  • 5 soldier classes: Brawler (melee, foam baton and shield), Blaster (homing foam darts), Guardian (tank with a big shield, 20% armour, taunts robots within 4.5 m), Cannoneer (lobbed corks with area damage), Medic (heals the most injured ally, pokes weakly when nobody is hurt)
  • 5 tiers per class (Recruit, Veteran, Elite, Hero, Legend), x2.3 stats per tier; 25 separate soldier models with new gear per tier (helmet, bigger weapons, shoulder pads and backpack, chest armour with a cape or plume, golden plastic with a crest and a glowing weapon tip) and tier colours olive, forest green, navy, crimson and gold
  • Auto-battle on a play-mat lane: the army marches in formation, engages three robot squads one after the other, heals 25% and regroups between stages; melee hits, homing foam darts and tin bolts, lobbed corks with area damage, a flying zapper, healing Medics and a taunting Guardian; a 90-second stalemate guard per stage
  • 3 commander abilities on a round button with a radial charge ring: Paper Plane Strike (from the start), Rally Horn (from level 7) and Bandage Drop (from level 15); each battle starts partly charged, the Command Whistle upgrade makes them stronger and recharge faster
  • 5 robot types with their own role (basic melee, ranged bolts, fast hard hitter on a spring, slow armoured drum tank, flying area zapper), painted in each world's own tin colours, with wind-up keys that spin; robots break into springs and gears
  • Champion levels (level 5 of every world: a giant crowned robot of the world's champion type with x6 HP, x2.5 damage and x1.7 size) and boss levels (level 10): Teddy Tyrant (Stomp, summons Tin Walkers), Robo Rex (Tail Sweep, Charge, summons Spring Boxers), Jack the Box King (Spring Punch, Bounce, summons Bolt Shooters) and Clockwork Dragon (Spark Breath, Wing Slam, summons Spark Drones), each special telegraphed by a ground decal that fills up before the hit; a boss health bar
  • Level generator: deterministic per level, squad budgets in "Walker equivalents" with budget weights measured by the simulator, up to 12 robots per squad in rows (melee in front, ranged behind); a new robot type joins the first squad of the level that introduces it
  • Results: up to 3 stars by the share of soldiers still standing, coins x2 with a rewarded ad, gems for the first 3-star clear of a level and the first win over each Champion and boss; after a defeat one revive (25 gems or a rewarded ad, every soldier back with 60% HP), and a lost battle still pays kill coins plus part of the victory reward per cleared stage
  • x1 / x2 battle speed (remembered), pause with Resume or Retreat
  • Toy Box Siege (endless mode, unlocked by the first boss): waves of growing squads, a boss every 10th wave cycling through the four, the world changing every 5 waves, coins per cleared wave and the best wave recorded
  • 5 permanent coin upgrades: Sturdy Plastic (+6% HP), Drill Training (+6% damage and healing), Pocket Money (+5% battle coins), Bulk Box (-2% recruit prices), Command Whistle (+8% ability power, shorter cooldown); 20 to 25 levels each
  • Barracks: 25 soldier cards (discovered the first time such a soldier exists) with HP and damage per tier, and the Robot Files with every robot and boss met in battle
  • 26 achievements with gem rewards; a 7-day daily reward calendar on local days (coins, gems, a Veteran and an Elite recruit; x2 with a rewarded ad; a missed day starts over at day 1); a free recruit gift next to the Battle! button (rewarded ad, every 3 minutes)
  • Shop: three gem packs (80, 500, 1200 gems), Remove Ads, a one-time Starter Pack (300 gems, 2 Elite recruits and coins), coin pouches and an Elite recruit for gems, 15 free gems for a rewarded ad every 4 hours, Restore Purchases
  • First-session tutorial with a sergeant's speech bubble and a pointing finger (recruit two Brawlers, merge them, recruit a Blaster, start the battle, use the ability)
  • Campaign map with four world tabs, 10 level nodes per world with their stars, Champion and boss markers and the Toy Box Siege entry with the best wave
  • Settings with sound, music, vibration, language, restore purchases, privacy policy, reset progress (asks first), version and credits; the Android back button (Escape in the editor) closes the top panel or popup, pauses a battle and, pressed twice on the deploy screen, quits
  • Procedural animation for every soldier, robot and boss (no Animator on units): idle, march with a toy-like hop, attacks per class, hit squash and flash, knock-out fall with a poof, victory cheer
  • Kid-friendly from top to bottom: foam darts, cork cannons, toy batons and bandages; no blood, no realistic guns
  • "Toy Box" style UI built for 1080 x 1920 portrait (warm cream cards with a deep-navy outline, glossy plastic buttons, Baloo 2 font), safe-area aware, red badges and toasts
  • English and Turkish (about 420 strings in CSV files), chosen from the device language and switchable in Settings; add a language by adding a column
  • Everything generated by code: Toy Legion > Build > Build Everything rebuilds textures, materials, effects, prefabs, the four world dioramas, all data, the icons, the UI and both scenes; the builders update assets in place and keep their GUIDs</li

Requirements

  • Unity 6000.0.85f1 or a later 6000.0 LTS patch; URP 17.0.4, uGUI 2.0.0 (with TextMesh Pro) and Test Framework 1.6.0 are resolved from the Package Manager. Do not publish builds made with a 6000.0 patch older than 6000.0.58f2: those patches have Unity's security problem CVE-2025-59489
  • Android 7.0+ (API 24), IL2CPP, ARMv7 + ARM64 / iOS 13+
  • For device builds: Unity's Android Build Support module (with OpenJDK and Android SDK & NDK Tools) and/or iOS Build Support; iOS builds need a Mac with Xcode, and App Store releases a paid Apple Developer Program membership
  • Optional, for regenerating assets only: Blender 3.6 (Tools/Blender) and Python 3.8+ (Tools/Audio, Tools/Palette, Tools/Dev; the batch, quick compile and sprite preview helpers in Tools/Dev are for Windows)
  • Optional, not included: Google Mobile Ads Unity plugin v9+ for AdMob, com.unity.purchasing 4.8+ (4.x, not 5.x) for Unity IAP