Table of Contents

Class ContentBuildPreprocessor

Namespace
GrindFest.Content.Editor
Assembly
GrindFest.dll

Regenerates the base content artifacts (StreamingAssets/Content/base) before every player build, so a build can never ship a stale index/mirrors/assets catalogue — the failure mode that otherwise ships silently (stats and loot queries read the artifacts, not the prefabs). The generator is deterministic (~3 s) and writes files only when they change, so a clean working tree stays clean.

If the scan fails, the build fails: the alternative — shipping the previous artifacts — is exactly what this hook exists to prevent. The sampled drift gate (ContentArtifactsTests.MirrorsMatchPrefabs) keeps the working tree honest between builds; this hook closes the build path itself.

Runs early (order -60) but after the VS Code archive download (-100), and before the story deploy preprocessors that consume content — see GrindFest.Workspace/CONTENT_PLATFORM_PLAN.md §7.

public class ContentBuildPreprocessor : IPreprocessBuildWithReport, IOrderedCallback
Inheritance
object
ContentBuildPreprocessor
Implements

Properties

callbackOrder

Returns a numeric value that determines the order in which the build callback is invoked.

Methods

OnPreprocessBuild(BuildReport)

Implement this method to receive a callback before the build is started.