No matching section
Try a broader search such as “item”, “day”, “save”, or “build”.
01 · Overview
What this asset gives you
CozyCrate is a complete, data-driven 2D packing-sim foundation. Runtime rules live in plain C# services; content and tuning live in ScriptableObjects; the presentation is assembled by event-driven uGUI views.
Starter items
Apparel, electronics, tools, groceries, toys, cosmetics, media, homeware, and curiosities.
Day structure
Eight guided curriculum days followed by deterministic procedural progression.
Upgrades
Workspace, storage, tools, automation, comfort, and cosmetic upgrades with live effects.
Clients
Category-based item pools, reputation gates, purchase gates, payout multipliers, and brand theming.
Box sizes
Distinct S, M, L, and XL cartons with continuous visual placement and footprint validation.
Difficulty modes
Chill, Normal, and Rush profiles control timers, penalties, bills, fines, and campaign pressure.
02 · First run
Quick start
- Open the project in Unity 6000.0.62f1. Using the exact editor patch is recommended. The project uses URP 17.0.4 and the Unity Input System 1.11.2.
- Use the Welcome to CozyCrate window. It opens automatically on the project's first Editor session and links directly to the Boot scene, documentation, Content Wizard, validation, and any missing setup. Choose Close for now to hide it for the session or Don't show again to disable startup display for this project.
- Let Unity import packages and assets. If TextMesh Pro prompts for resources, import the essentials or use
CozyCrate > Import TMP Essentials. - Open
Assets/CozyCrate/Scenes/Boot.unity. Boot is the composition root and should be the first scene in Build Settings. - Press Play. Boot loads the catalog, settings, save, audio service, and Main Menu. Starting or continuing a run opens Workshop.
- Validate before modifying. Run
CozyCrate > Validate Content. A clean starter package reports zero problems.
03 · Technical map
Architecture and runtime flow
Three deliberately small scenes host a runtime-built application. A single service graph owns game state, while views react through an EventBus.
Assembly direction
CozyCrate.App Composition: Bootstrapper, AppFlow, GameSession
CozyCrate.UI Runtime uGUI views, HUD, tablet, tutorials
CozyCrate.Progression Shift lifecycle, reputation, upgrades
CozyCrate.Economy Payouts, money, bank, loans, bills
CozyCrate.Systems Suspicious-order consequences, optional cat service
CozyCrate.Audio Audio routing and procedural fallback
CozyCrate.Gameplay Orders, packing, validation, item processes
CozyCrate.Data ScriptableObject schemas and ContentCatalog
CozyCrate.Core Events, service access, saves, settings, utilities
Rules layer
Services such as PackingService, OrderService, EconomyService, and ProgressionService own state and behavior. They are testable without a scene.
View layer
MonoBehaviours build and update UI. Views subscribe to events and call public service methods; they should not duplicate validation or economy rules.
The gameplay loop
Read order slip -> arrange intake -> process dirty/broken items -> choose a box
-> place items -> apply protection -> attach handling/address labels -> seal
-> drag parcel to conveyor -> validate -> payout -> finish quota -> daily report
-> tablet: restock / shop / clients / bank / settings -> next day
The ShippingValidator is the final authority. Missing box, items, address, or seal cause a hard reject. Lesser mistakes produce payout penalties and report feedback.
04 · Project map
Where everything lives
Assets/CozyCrate/
|-- ArtSources/ Curated editable source textures
|-- Data/ ScriptableObject content and configuration
| |-- Boxes/ Clients/ Consumables/ Items/ Stickers/ Upgrades/
| |-- Config/ GameConfig, UITheme, difficulty profiles
| |-- Localization/ String-table overrides
| `-- Shapes/ Item footprint definitions
|-- Documentation/ Single customer guide and licensing reference
|-- Editor/DataTools/ Wizards, generators, validator, build menu
|-- Resources/CozyCrate/ Catalog, art, audio-library asset
|-- Scenes/ Boot, MainMenu, Workshop
|-- Scripts/ App, Audio, Core, Data, Economy, Gameplay...
|-- Tests/ EditMode and PlayMode suites
`-- Third Party Notices.txt AI-assisted content and included-content notices
Packages/manifest.json Unity package versions
ProjectSettings/ Rendering, input, player/build settings
Assets/CozyCrate/Resources/CozyCrate/Catalog.asset references every definition used by the game. A valid asset that is not registered there will not appear at runtime.05 · Data-driven content
The content model
Definitions are assets; runtime objects refer back to them. Stable lowercase IDs are used in saves, prerequisites, inventory, and lookups.
| Definition | Controls | Folder |
|---|---|---|
ItemDefinition | Name, category, footprint, weight, handling flags, condition chances, value, sprite | Data/Items |
BoxDefinition | S-XL size, logical dimensions, price, stock/cap, open and closed sprites | Data/Boxes |
ClientDefinition | Brand, category pool, reward multiplier, gates, order-size limits, art | Data/Clients |
ConsumableDefinition | Initial stock, capacity, restock price/amount, tray sprite | Data/Consumables |
StickerDefinition | Handling type, art/tint, sheet consumption mapping | Data/Stickers |
UpgradeDefinition | Price, prerequisites, kind, one or more typed effects, icon | Data/Upgrades |
FootprintShapeSO | Occupied logical cells and rotation behavior | Data/Shapes |
DifficultyProfile | Timer, failure rule, penalty/bill/fine pressure | Data/Config |
GameConfig | Campaign pacing, reward curves, penalties, finance, events, thresholds | Data/Config |
UITheme | Global palette, category colors, visual constants | Data/Config |
ID rules
- Use unique, lowercase, stable identifiers such as
item_tea_kettle. - Do not change an ID after publishing a build unless you also migrate existing saves.
- Asset filenames may change; runtime identity comes from the definition's
id. - Run
CozyCrate > Validate Contentafter additions or dependency changes.
06 · Content recipe
Create items and footprint shapes
Recommended: Content Wizard
- Open
CozyCrate > Content Wizardand select Item. - Set display name, category, footprint, weight, base value, and rotation.
- Enable the requirements the shipping validator must enforce: fragile, hazard, keep dry, or orientation-sensitive.
- Set dirty/broken arrival probabilities if the item should use a processing mini-game.
- Assign a sprite now or leave it empty for a fallback, then click Create Item. The wizard creates, registers, saves, and validates it.
How an item enters generated orders
An item becomes eligible when it is registered in the catalog and at least one unlocked client includes its ItemCategory. Later procedural days sample that client-filtered pool.
Visual size versus logical footprint
Sprite silhouette
Determines what the player sees and supports alpha-aware overlap checks. Trim excessive transparent margins so the painted object fills the texture sensibly.
Footprint shape
Defines logical packing occupancy and rotation. Use the custom inspector on a shape asset to paint occupied cells. Share shapes between similar items.
Manual creation
Duplicate a nearby item asset, give it a new ID, adjust its fields, and add it to Catalog.asset > items. Manual creation is useful for copying a carefully tuned family of items.
07 · Level design
Create and tune days
DayPlan containing a quota and orders, while ShiftController moves between Working, Report, and BetweenDays phases.Days 1-8: authored curriculum
| Day | Newly taught | Where controlled |
|---|---|---|
| 1 | Basic packing, peanuts, address code, tape, shipping | OrderGenerator.GenerateTutorialDay()FeatureUnlocks.csTutorialDirector.cs |
| 2 | Gift handling and knife/unsealing recovery | |
| 3 | Bubble wrap and fragile handling | |
| 4 | Heavy handling | |
| 5 | This Way Up | |
| 6 | Keep Dry | |
| 7 | Chemical hazard | |
| 8 | Radioactive hazard; suspicious-order system becomes eligible |
Modify or add an authored introduction day
- Add or update the unlock constant in
Scripts/Gameplay/FeatureUnlocks.cs. - Add a matching case in
OrderGenerator.GenerateTutorialDay(). Use existing registered item IDs and ensure each order fits a box. - Update
TutorialDirectorso help appears when the new action is actually relevant. - Make the tray tool obey the same unlock day, following
TrayView.AddLock(). - Move the procedural-day boundary in
OrderGenerator.GenerateDay()if the curriculum becomes longer than day 8. - Add assertions to
OrderGeneratorTestsand a PlayMode flow test.
Day 9 onward: seeded procedural progression
Procedural days use the run seed, current day, unlocked clients, and these GameConfig.asset curves:
| Curve / field | Effect |
|---|---|
quotaByDay | How many orders must be handled that day. |
itemsPerOrderByDay | Target item count before each client's min/max clamp. |
specialHandlingByDay | Bias toward items with handling requirements. |
rushChanceByDay | Chance for a time-bonus rush order. |
rewardGrowthByDay | Campaign reward scaling. |
giftChance | Base chance of gift orders. |
suspiciousFirstDay + chance | When at most one suspicious order per day can enter. |
Make the campaign longer, faster, or harder
Edit the curve keys in GameConfig.asset. Curves clamp outside their authored range, so add later keys if you want difficulty to keep changing after the current final key. Re-run balance and order-generation tests afterward.
08 · Brands and progression
Create a client
- Open
CozyCrate > Content Wizard > Client. - Choose one or more item categories. Those categories form the client's procedural item pool.
- Set the value multiplier, unlock reputation, optional unlock price, item-count range, and special-handling bias.
- Add an original name, color, blurb, and logo art, then create the asset.
startsUnlocked clients are always restored as available, including on fresh saves. Other clients reveal when total reputation reaches their threshold. Free clients unlock immediately; priced clients can then be purchased in the tablet's Clients app.
09 · Packing model
Boxes, placement, and shipping validation
The player experiences loose, direct placement. Underneath, logical footprints and alpha-aware silhouettes keep items in bounds and prevent invalid overlap.
Open art
BoxDefinition.sprite is the box used while packing, including its distinct dimensions and flaps.
Closed art
closedSprite is the finished parcel appearance. Use box-specific artwork instead of scaling one generic carton.
Logical capacity
grid defines occupancy: shipped defaults are S 2x2, M 3x2, L 3x3, and XL 4x3.
Add or modify a box
- Duplicate the closest
BoxDefinitioninData/Boxes. - Give it a unique ID and an unused or intentionally shared
BoxSizestrategy. - Set logical dimensions, cost, initial stock, capacity, and correctly framed open/closed sprites.
- Register it in
Catalog.asset > boxes, ordered from smallest to largest if size-based selection should remain intuitive. - Test the new capacity with
BoxFitter, placement, seal/unseal, drag-to-conveyor, and shipping.
Protection and correctness
- Packing peanuts are required for every shipped carton and count as a consumable.
- Fragile items require bubble protection and the fragile handling label.
- The correct address is a hard requirement; an incorrect code returns the parcel.
- A parcel must contain all required items and be sealed before it can ship.
- Oversized boxes and incomplete void filling can reduce payout.
10 · Tools and labels
Handling tools, stickers, and consumables
Requirements derive from the order type and item flags. A sticker is a freely positioned visual mark on the carton, while validation records its semantic type.
| Requirement | Source | Default introduction |
|---|---|---|
| Address | Every parcel's unique three-digit destination | Day 1 |
| Gift | OrderType.Gift | Day 2 |
| Fragile + bubble | ItemDefinition.fragile | Day 3 |
| Heavy | weight == Heavy | Day 4 |
| This Way Up | orientationSensitive | Day 5 |
| Keep Dry | keepDry | Day 6 |
| Chemical | hazard == Chemical | Day 7 |
| Radioactive | hazard == Radioactive | Day 8 |
Add a new handling type
- Append a new value to
StickerType. Avoid reordering serialized enum values. - Create and register a matching
StickerDefinitionplus its sheetConsumableDefinition. - Derive the requirement from an item/order property in
Order.RequiredStickers(). - Add its unlock day in
FeatureUnlocksand tutorial behavior inTutorialDirector. - Add any penalty field to
GameConfigand validate it inShippingValidator. - Test the correct, missing, and wrong-label cases.
11 · Purchasables
Create upgrades and effects
Use an existing effect type
- Open
CozyCrate > Content Wizard > Upgrade. - Set name, kind, price, description, effect type/value, and optional prerequisite.
- Create the asset. It is registered and validated automatically.
- Play through the real tablet Shop app and verify purchase, live effect, affordability state, and save/reload.
| Effect family | Examples |
|---|---|
| Capacity | PackingSlots, BoxStockCap, ConsumableStockCap |
| Tools | TapeSpeed, OneClickSticker, AutoAddress, AutoCleanBrush |
| Automation | PrefetchHelper, BillReduction |
| Comfort/cosmetic | CatCalm, TapeColor, DeskSkin |
Add a brand-new effect
Append an EffectType value and implement its aggregation in ProgressionService.RecomputeEffects(). That method is the intended seam between purchased definitions and live systems. Persist only the purchased upgrade ID; aggregates are rebuilt after load.
12 · Presentation
Retheme the UI, replace art, and add audio
Global visual theme
Edit Assets/CozyCrate/Data/Config/UITheme.asset. It contains the shared palette and category colors read by UIFactory and placeholder rendering. Runtime UI is composed in Scripts/UI; change layout there or replace individual builders with prefabs while keeping the same service/event contract.
Sprite workflow
- Place production art under
Assets/CozyCrate/Resources/CozyCrate/Art/in the appropriate subfolder. - Run
CozyCrate > Prepare Generated Art. The importer configures Sprite/Single, transparency, no mipmaps, clamp, sRGB, 100 PPU, and suitable size/compression. - Assign the resulting sprite to the relevant Item, Box, Sticker, Client, Upgrade, or Consumable asset.
- For general UI panels/buttons, preserve the intended 9-slice borders or configure equivalent borders in Sprite Editor.
- Test at 16:9, a narrower aspect ratio, and each available UI scale setting.
Audio overrides
Add clips to Assets/CozyCrate/Resources/CozyCrate/AudioLibrary.asset. Each entry maps a string ID to an AudioClip. Common IDs include tape, coin, cat_meow, and music beds menu, work, and report. Missing entries fall back to procedural audio.
Settings separately control master, music, and SFX volume. Test override clips at every slider extreme and ensure loops do not click.
13 · Text
Localization and customer-facing strings
Strings_EN.asset is a key/value override table. Views request text through L.Get(key, English fallback). This makes it possible to replace wording without editing each view.
- Search
Scripts/UIforL.Get(to inventory existing keys. - Add or edit matching keys in
Data/Localization/Strings_EN.asset. - For another language, create another
StringTableSOand select it at boot before UI construction. - Replace the TMP font asset if the target language needs additional glyph coverage.
- Test long strings at the largest UI scale, especially top bars, tray cards, order slips, tablet buttons, tutorials, and reports.
14 · Tuning
Economy, difficulty, and campaign balance
GameConfig.asset
Global pacing curves, base fee, reward growth, penalties, bonuses, par time, finance rates, event chances, reputation awards, and the win threshold.
Difficulty profiles
Timer behavior, day duration, quota-failure rule, penalty multiplier, suspicious fines, bill multiplier, and interest multiplier.
Per-order payout model
payout = round(baseReward x accuracy x boxEconomy x speed x suspiciousMultiplier)
+ rushBonus - boxCost - suppliesCost
Accuracy is reduced by the weighted infractions configured in GameConfig. Box economy rewards appropriately small cartons. Timed modes can award speed bonuses. The daily settlement then applies rent, utilities, bank interest, loan interest, pending fines, and upgrade modifiers.
Safe balancing loop
- Duplicate the project or commit before broad tuning.
- Adjust one family at a time: pacing, payout, penalties, or bills.
- Run
BalanceCurveTeststo simulate a competent campaign. - Play representative early, middle, and late days on all three difficulties.
- Verify bank, loan, client, restock, and upgrade affordability in the tablet.
15 · Persistence
Saves and settings
cozycrate_save.json
Run state: day, cash, bank, loan, karma, seed, wins, fines, clients, reputation, upgrades, selected tape, stock, stats, and net history.
cozycrate_settings.json
Player preferences: master/music/SFX, UI scale, reduce motion, colorblind labels, and key bindings. It survives Delete Save.
Both files are human-readable JSON under Application.persistentDataPath. On Windows with the shipped company/product identifiers, that normally resolves under:
%USERPROFILE%\AppData\LocalLow\Szekipapa77\CozyCrate\
Autosave behavior
- A day-start snapshot is written when a shift begins.
- Day completion stores the next morning's state.
- Quitting during work keeps the morning snapshot so the shift replays safely.
- Content references use stable IDs, not Unity object references.
Evolve the schema
Add fields with safe defaults, increment schemaVersion, and chain migration logic in SaveService.Migrate(). Test an old JSON fixture, a fresh save, and a current save. If you rename a content ID, migrate every saved list/key that can contain it.
16 · Workflow
Editor tools
| CozyCrate menu command | Purpose | Use with care |
|---|---|---|
| Welcome & Documentation | Reopens the customer welcome hub, quick-start actions, project status, and guide links. | Startup display is controlled by Show Welcome On Project Open. |
| Content Wizard | Creates and registers Items, Clients, and Upgrades with sensible defaults. | Preferred routine workflow. |
| Validate Content | Checks IDs, nulls, footprints, sticker stock links, prerequisites, categories, and starter content floors. | Run after every content change. |
| Setup All | Imports TMP essentials, generates starter content/scenes, then validates. | Can re-stamp shipped asset values. |
| Generate All Content | Restores the starter ScriptableObject catalog from ContentGenerator.cs. | Back up customized starter assets first. |
| Generate Scenes | Recreates Boot/MainMenu/Workshop and resets Build Settings to those scenes. | Back up scene customizations first. |
| Import TMP Essentials | Ensures TextMesh Pro resources required by player builds. | Safe. |
| Prepare Generated Art | Reimports production-art textures with the package policy. | Applies to the CozyCrate Art folder. |
| Build Windows x64 | Release build to Builds/Windows/CozyCrate.exe. | Uses enabled Build Settings scenes. |
| Build Windows x64 (Development + PlaytestBot) | Development player prepared for automated UI smoke testing. | Launch with -playtest. |
| Build Android APK (Landscape) | Universal ARMv7/ARM64 APK at Builds/Android/CozyCrate.apk. | Sets landscape-only autorotation, IL2CPP, and the CozyCrate application identifier. |
| Build WebGL | Browser build at Builds/WebGL. | Uses uncompressed files for straightforward static hosting. |
17 · Quality assurance
Test before you publish
Open Window > General > Test Runner. Run both EditMode and PlayMode suites after functional changes.
EditMode coverage
Box placement/rotation, silhouette overlap, fitting/backtracking, shipping rules, payout/economy math, order determinism, tutorial days, mini-games, JSON round trips, and campaign balance.
PlayMode coverage
Boot and Workshop flows, shipping, address rejection, recycle/unseal, suspicious orders, saves, tutorial progression, and extensive tablet bank/shop/restock/client/settings behavior.
Manual regression checklist
- Start a clean save in Chill, Normal, and Rush.
- Complete days 1-8 and confirm tools unlock only when introduced.
- Move items in intake; pack, rotate, reject overlap, and fill each carton size.
- Apply correct and incorrect addresses and each handling label.
- Seal, unseal, recycle, drag a completed parcel, and verify sorting order/tutorial overlays.
- Purchase every upgrade and priced client; restock every supply; deposit/withdraw/borrow/repay.
- Save, exit, relaunch, and verify balances, stock, progression, settings, and visuals.
- Check narrow, wide, and standard resolutions plus every UI-scale setting.
Development playtest bot
Build with the development command, then launch CozyCrate.exe -playtest. The bot operates the real UI and writes screenshots and a PASS/FAIL log beneath Application.persistentDataPath/playtest/. Treat it as a smoke test, not a replacement for the full Test Runner or human UX review.
18 · Delivery
Build and export
Windows player
- Run all content validation and tests; resolve Console errors.
- Confirm Build Settings order: Boot, MainMenu, Workshop.
- Review Company Name, Product Name, version, icons, default resolution, and URP quality.
- Choose
CozyCrate > Build Windows x64. - Run
Builds/Windows/CozyCrate.exeon a clean machine/profile and test save creation.
Android landscape APK
- Install Android Build Support, SDK/NDK Tools, and OpenJDK for Unity 6000.0.62f1.
- Review Android icons, package identifier, minimum API level, and signing before a store release.
- Choose
CozyCrate > Build Android APK (Landscape). - Install
Builds/Android/CozyCrate.apkon representative landscape phones and tablets and verify touch targets.
WebGL player
- Install WebGL Build Support for Unity 6000.0.62f1.
- Choose
CozyCrate > Build WebGL. - Serve the complete
Builds/WebGLdirectory over HTTP(S); openingindex.htmldirectly from disk is unsupported. - Verify loading, pointer input, audio activation, saving, fullscreen behavior, and responsive scaling in current desktop browsers.
Unity Asset Store package hygiene
- Include
Assets/CozyCrateand avoid unrelated project content. - Keep this
Documentationfolder inside the asset root so customers can reach it immediately. - List Unity 6000.0.62f1 and URP 17.0.4 as the verified environment.
- Keep all required licensing and attribution information in the licensing section of this guide.
- Import the exported package into a blank compatible URP project and repeat Quick Start.
19 · Extension seams
Common code recipes
Add a new item-processing mini-game
IItemProcess, following CleanProcess or RepairProcess. Map the relevant condition in ProcessRegistry, create the UI interaction in the mini-game panel, and add pure-logic plus PlayMode tests.Add a fourth difficulty
Difficulty enum value, create a DifficultyProfile, register it in Catalog.asset, expose it in the mode-selection UI, and add tests for timing, penalties, bills, and save parsing.Add a new tablet app
Scripts/UI/Tablet/TabletApps.cs. Keep state changes in a service, let the app call that service, publish events for cross-view updates, and ensure opening the tablet pauses/blocks gameplay consistently where appropriate.Replace a runtime-built view with a prefab
OnDestroy. Confirm Canvas scaling, raycast order, drag regions, and tutorial overlay sorting.Enable or replace the cat mechanic
GameSession constructs CatService with enabled: false, so no gameplay cat appears. To opt in, change that composition choice, restore an appropriate view/mascot, review catFirstDay and difficulty frequency, and re-run cat/system tests.Change the win condition
GameConfig.winThreshold. For a new kind of goal, extend the win check in the economy/progression flow, update SaveData, build the corresponding UI, and test that the event triggers once without blocking free play.20 · Licensing & included content
What is included and where it came from
CozyCrate ships as an editable game template. This section summarizes licensing and attribution; the top-level Third Party Notices.txt provides the buyer-facing AI-assisted content disclosure and affected-content list.
Code
The C# source in Scripts, Editor, and Tests was created for CozyCrate and is included as editable source with the asset.
Production art
Raster sprites and backgrounds under Resources/CozyCrate/Art were created specifically for this package. No third-party stock image pack is redistributed. Curated editable source textures are stored in ArtSources.
Procedural visuals and audio
PlaceholderSprites supplies original code-generated fallback graphics when authored sprites are not assigned. Default effects and music beds are synthesized by ProceduralSfx and ProceduralMusic; CozyCrate does not redistribute third-party audio clips.
Font and Unity packages
TextMesh Pro's Liberation Sans assets are distributed by Unity under the SIL Open Font License 1.1. The original OFL text remains with Unity's TextMesh Pro package resources. URP, Input System, uGUI/TextMesh Pro, Test Framework, and other Unity packages remain subject to Unity's applicable terms.
Your responsibilities when extending the template
- Confirm commercial-use and redistribution rights for every art, audio, font, text, code, or brand you add.
- Keep attribution and license material supplied with third-party content you import.
- Do not ship added content when its commercial-use or redistribution rights are unclear.
- Review target-platform and Unity-package terms before publishing your modified game.
21 · Help
Troubleshooting
“Catalog asset missing” appears in the Console
Assets/CozyCrate/Resources/CozyCrate/Catalog.asset exists. Restore a stock copy with Generate All Content only after backing up custom starter assets.My new item never appears
Catalog.asset > items, has a footprint, and shares a category with an unlocked client. Tutorial days 1-8 are explicitly authored and will not sample arbitrary new items.Text is missing or TMP errors occur in a build
CozyCrate > Import TMP Essentials, check the TMP font/reference, then rebuild. For translated text, confirm the font contains the required glyphs.UI looks stretched, clipped, or leaves its panel
Sprite looks too small or overlap feels wrong
A parcel refuses to ship
A customized value returned to its default
Setup All and Generate All Content re-author shipped definitions from ContentGenerator.cs. Restore your version-control copy or mirror permanent default changes into the generator.Where do I reset a local test profile?
cozycrate_save.json from the persistent data folder while the player is closed. Settings are stored separately.