Przeskocz do zawartości
Multimedia 1 dla listy Asset Recipes - Create and Wire a Whole Set of Assets From One Recipe

Opis

Every new content item means making the same six to ten assets by hand and wiring them together. The Blueprint from the right parent. The Material Instance from the right master. The DataAsset. The DataTable row. The folders, named to the studio convention. It is done weekly, done slightly differently every time, and juniors get it wrong.

Asset Recipes makes that whole set from a recipe you can read, edit and review.

A recipe is a JSON file. It names the steps, the naming and folder patterns, and which property on one asset points at another. Run it with an item name and it creates the set and assigns the cross-references:

UnrealEditor-Cmd.exe MyGame.uproject -run=AssetRecipes -Recipe=Weapon.json -Name=Sword -Apply

Why text, and not a data asset. A recipe is a studio convention, and a convention has to survive code review. A DataAsset is a binary uasset: two leads editing one produce a merge conflict no version control can resolve, and a reviewer sees "binary file changed". A JSON recipe diffs line by line, reviews in a pull request, greps, and can be generated by a build script.

Three step kinds. create makes a new asset through the engine's own factory for that class. duplicate copies an existing template asset, which covers every asset type including ones with no factory at all - Behaviour Trees, Widget Blueprints, Niagara systems. row adds or replaces one row in an existing DataTable.

Wiring does not care about order. Properties are assigned once every asset in the run exists, so a step may point at one declared later, and two steps may point at each other. Values are read through the engine's own property text format, so object references, numbers, enums, names and structs all work with no special syntax.

Running it again is safe. Re-running a recipe for the same item is idempotent: assets that already exist are left exactly as they are and their wiring is re-applied. That is what makes a recipe editable - add a step six months in, re-run it across every weapon you have, and the new asset appears for each one while nothing existing is disturbed.

It refuses rather than half-finishing. The whole run stops, before anything is written, on an unknown token, a reference to a step that does not exist or to itself, two steps that would write the same asset, a row step whose DataTable is missing, a duplicate step id, an unknown kind, or a missing required field. A half-populated project is worse than an unpopulated one, so none of these is a warning. An unknown token would otherwise create an asset literally named BP_{Nmae} in a folder named after the same typo.

Every run writes a proof sheet. A self-contained HTML page showing every asset it would create, every one that already exists, every property it would wire and what it points at. It opens offline, out of a zip, so it attaches to a code review.

Built for a build server. Headless commandlet with distinct exit codes - 0 succeeded, 1 bad command line, 2 unreadable recipe, 3 plan refused, 4 write failed - so a broken recipe fails a build instead of half-populating a project. Batches from -Names=Sword,Axe,Bow or -NamesFile=weapons.txt.

Revision control. Every file a run is about to write is checked out first, and the proof sheet says so. Assets that already exist and gain no new wiring are not checked out - a tool that re-saves files it did not change turns a two-file change into a twenty-file changelist.

What it does not do, stated here rather than discovered after purchase: it does not create DataTables (a row step would have to choose a row struct on your behalf); it sets Blueprint defaults, not graph nodes; and it has no undo - the preview is the safety mechanism.

Technical Information

Features: Creates and wires a whole set of related assets from a recipe held as editable JSON. Three step kinds - create any factory-creatable asset type, duplicate any template asset, add or replace a DataTable row. Cross-references between assets in the same run, resolved by step id and applied after every asset exists, so step order does not matter. Token-driven naming and folder patterns. Idempotent re-runs that leave existing assets alone and re-apply their wiring. A total-validation refusal pass that stops the whole run before any write on an unknown token, a dangling or self reference, a step collision, a missing DataTable, a duplicate step id, an unknown kind or a missing field. A designed, self-contained HTML proof sheet per run. Headless commandlet with five distinct exit codes for CI. Revision-control checkout of every touched file, and only the files actually changed. Batch runs from a comma list or a names file.

Code Modules: AssetRecipes (Editor)

Number of Blueprints: 0

Number of C++ Classes: 2 (UAssetRecipesCommandlet, FAssetRecipesModule), plus 5 plain-data types and 5 namespaces

Network Replicated: No - this is an editor-only tool and runs no runtime code

Supported Development Platforms: Windows

Supported Target Build Platforms: Windows

Example Project: None. Three example recipes ship inside the plugin at AssetRecipes/ExampleRecipes (Weapon.json, Enemy.json, UIScreen.json) - copy one into your own project and edit the paths. A sample project is deliberately not included because a recipe only means anything against your own parent classes, master materials and DataTables.

Important/Additional Notes: Editor-only, no runtime cost, nothing to disable in a shipping build. Full C++ source included and readable - no encrypted blobs, no obfuscation. Verified on Unreal Engine 5.8 only.

Verified on Unreal Engine 5.8 only. That is the only engine this plugin has been built and run against, so it is the only version claimed.

Full documentation

AI disclosure: code and graphics are AI-generated. Sounds: none.

Uwzględnione formaty