Inspiration

Third-party Unity asset packs rarely arrive in the naming, folder, importer, Prefab, and FBX conventions that a production repository expects. Cleaning them manually is slow and risky, while letting an AI agent directly rewrite assets gives it too much authority.

I built CoCo Asset Flow to separate those concerns: AI can help solve a declarative cleanup policy, but only Unity can execute asset changes.

What it does

CoCo Asset Flow is an Editor-only Unity 6 UPM that turns inconsistent 3D asset packs into verified, project-ready content.

The standard workflow is:

Scan → Inventory → Validate Profile → Preview → explicit Apply → quarantine/audit → Verify → JSON Report

A Cleanup Profile v1 can match assets by type, extension, name, path regex, and Material Shader name. Ordered rules can rename and route assets, configure Texture import settings, clean Prefabs, adjust FBX clip settings, extract animations, or explicitly delete an asset.

Before writing anything, Cleanup Runner presents the complete Dry Run and binds confirmation to an exact Plan ID. The deterministic Unity Executor then uses Unity AssetDatabase operations, preserves and checks GUIDs and references, stages deletes in quarantine, rolls back pre-commit failures, verifies final serialized state, requires Source to be empty, and proves idempotency with a zero-change second Preview.

AI-assisted Profile Solver

The optional Solver gives Codex a constrained role. It reads a fresh Source-bound Inventory, Cleanup Profile JSON Schema, and user-designated repository conventions. It may create only the disclosed Profile JSON and adjacent rationale.

It cannot Apply, edit .meta files, rewrite source images, or generate an asset processor. If Profile v1 cannot safely express a requirement, it reports Unsupported instead of guessing. Unity remains the sole asset-write authority, and Apply always requires explicit user confirmation.

How I used Codex and GPT-5.6

I used Codex with GPT-5.6 as a repository-grounded development partner throughout the core build. It helped turn the product safety contract into the Profile schema, scanner, planner, deterministic executor, rollback and verification pipeline, bilingual Editor UI, progress reporting, documentation, and focused EditMode tests.

Important decisions remained explicit and human-controlled: separating FBX root-transform settings from Prefab root motion, preserving GUID identity through AssetDatabase moves, failing closed on ambiguous external Material bindings, quarantining deletes until verification, and limiting AI output to declarative JSON.

The same /feedback session was used to inspect real failures from large third-party packs. Those failures drove practical fixes for Unity Material reserialization, FBX sub-resource identity, bounded canonical audits, rollback behavior, and multi-Material remapping rather than being hidden by permissive rules.

Challenges

Unity may reserialize Materials and Prefabs during a move, FBX sub-resource local IDs can change after reimport, and external FBX Material lookup can be ambiguous. A safe tool must distinguish harmless representation changes from genuine semantic changes without weakening verification.

Another challenge was keeping large failures bounded. Canonical state differences are written to sidecar audit files and grouped by diagnostic incident, so a failed transaction does not flood the Console or freeze the Results UI.

Try it

The repository root is directly installable as a Unity package:

https://github.com/YunXEE/CoCoAssetFlow.git

Requires Unity Editor 6000.3 or newer. Install it with Package Manager → + → Install package from git URL, then open Tools → CoCo Asset Flow → Profile Editor and Cleanup Runner. The package is Editor-only and does not require rebuilding from source.

What's next

Future versions can expand the Profile vocabulary, platform coverage, Shader conversion adapters, and optional source-image codecs while retaining the same safety boundary: AI proposes, the user confirms, and Unity executes deterministically.

Built With

  • c#
  • codex
  • gpt-5.6
  • json-schema
  • newtonsoft.json
  • python
  • ui-toolkit
  • unity-6
  • unity-assetdatabase
  • unity-editor
Share this project:

Updates