Table of Contents

Method Build

Namespace
GrindFest.Content.Editor
Assembly
GrindFest.dll

Build(string, string, string[], bool)

Builds one directory. Returns a one-line report; never throws at the caller.

public static string Build(string name, string outputPath, string[] rootAssetPaths, bool cleanBuildCache = false)

Parameters

name string
outputPath string
rootAssetPaths string[]
cleanBuildCache bool

Pass UnityEditor.BuildContentOptions.CleanBuildCache, which wipes Unity's build-artifact cache before building and therefore makes the build a cold one — every file re-serialised from scratch.

Default false, and the base build no longer passes it. It was added on 19.09.2026 as a workaround for a corrupted build cache: a stale cache made the build fail with Gather and collect build metadata: Unexpected header for AssetBuildMetaData blob from VirtualArtifacts/Extra/<hash>.buildmeta, write zero files, and return a BuildReport whose only signal is summary.result == Failed — and the same asset failed alone in one run and succeeded alone in the next, which cost hours of bisection (measured then: Abandoned Settlement.prefab alone Failed without the flag, Succeeded, 563 files with it).

That corruption was in the Unity Data Store, not in anything this option repairs. Unity named it itself (Corrupted artifact … detected in UDS), and after Library/DataStore, Library/BuildCache, Library/ArtifactDB and Library/PlayerDataCache were deleted, the same full build passes with this flag and without it, both at TotalErrors = 0. What the flag still buys is a cold build: measured on the full base directory (29 roots, 18 900 files, 1.33 GB) it costs 11.8–13.3 minutes against 10.2 minutes without — and that gap is the floor a cold cache imposes, on every build, forever. Correctness is now covered by BuildBase's input fingerprint, which skips a build whose input has not changed at all.

Returns

string