Black CraftDev

Docs/Reference

Integration

For programmers: assemblies, optional Odin, the guides, and the seam your project can extend.

EditionLite and Pro

Assemblies

Hexbench is editor-only, and its assembly definitions make sure of it. Nothing in the package compiles into a player build.

AssemblyContents
BlackCraft.Hexbench.EditorWindows and inspectors
BlackCraft.Hexbench.AuthoringThe atlas packer, channel and adjustment maths, map and noise generators, UV analysis and all settings assets. It sits in the Runtime folder but compiles for the Editor only.
BlackCraft.Core.Runtime, BlackCraft.Core.EditorShipped in the shared Core folder: attributes, interfaces and the UI kit that every BlackCraft package uses. Editor-only here as well.

Authoring references BlackCraft.Core.Runtime, and Editor references Authoring plus both Core assemblies.

If your own code needs to call into Hexbench, put it in an Editor-only assembly (or an Editor folder) that references the assemblies it uses. A runtime assembly cannot reference them since they are not compiled for players.

Hexbench does not reach into your project. The report windows are built on the Issue Report base in Core, the previews on TexturePreview and the scope pickers on ScanScopes. Settings assets are found through the Core settings locator.

The channel isolate in TexturePreview blits through Hidden/BlackCraft/Channel Isolate, a shader in Core/Editor/Shaders. Because it is in an Editor folder, it is left out of builds.

Odin

Odin is optional and detected through its own ODIN_INSPECTOR define. When it is present the authoring inspectors use its attributes. Without it they use native attributes and the inert shims in OdinCompatibility.cs. Both paths compile.

Extending the tools

There is one seam where your project can plug in. It is optional, and with nothing registered the tools work as they are.

A step after the atlas bake

The Atlas Maker only packs grids. If something in your project consumes atlases (a sprite sheet, a decal set, a palette of scattered props), register a post-bake step for it. The step gets its own section in the window with an on/off switch, and runs after the atlas has been written.

C#
[InitializeOnLoad]
internal static class MyAtlasStep
{
    static MyAtlasStep()
    {
        AtlasPostBakeSteps.Register(new AtlasPostBakeStep
        {
            Id = "my-consumer",
            CreateGroup = () => new MyGroup(), // any ToggleableSettingGroup
            Run = Wire, // void Wire(AtlasBakeInfo info)
        });
    }
}

AtlasBakeInfo holds the packed result with each cell's aspect ratio, the asset path, the column and row counts, and the sources in cell order. Entry i is the art in cell i.

Watch the orientation. Cells count left to right and top to bottom, but UV space runs bottom-up, so cell 0 is at the top left of the texture. If you get this backwards, the atlas looks correct as a texture while every cell draws some other cell's art.

Guides

Any .md file inside a BlackCraft package folder becomes a page in Tools > BlackCraft > Help > Guides. Writing a Guide explains how to add your own so they are listed here.

integrationassemblyasmdefodineditor onlyatlaspost-bake