Image and Sprite authoring
Double-click a PNG in Assets, open a sprite frame from an Inspector, or choose Open Image / Sprite. Each source image opens in an ordinary workspace tab. A frame uses its source image's document and metadata history: opening a second frame changes the selection in that same tab. PNG is the current texture importer's supported source format. Derived atlas pages and built-in textures have a read-only view; unsupported binary asset kinds receive asset information instead of being passed to the code editor.
On this page
Inspect pixels and atlas packing
Source pixels shows the original file or selected source frame. Imported pixels shows the committed runtime artifact, including its format and linear/premultiplied processing. Imported frames are displayed in their original logical canvas, with transparent trim padding restored. Open Atlas opens the packed page and highlights the selected region separately. Source rectangles and frame IDs never become atlas coordinates.
Use the wheel to zoom at the cursor and drag with the middle or right mouse button to pan. Fit fills the available canvas; 1:1 maps one image texel to one physical display pixel, accounting for the editor's display scale. The pixel grid appears at sufficient magnification. RGB and individual R/G/B/Alpha modes expose raw channel bytes, including RGB stored under zero alpha; they do not modify the source or importer settings. The readout gives the logical pixel coordinate and four RGBA8 values from the selected representation. RGBA uses the image's coverage over a checker, light or dark background.
The source/frame pivot shown in the panel is normalized in the original logical canvas. It is authoring alignment information. The preview has its own center origin, and existing nodes keep their SpriteRenderer.Origin. For a sheet, select frames by their persistent IDs; a rename or ordering change does not create new channel identities. This viewer does not paint pixels or create animation frames.
Roles and surface channels
The metadata document is the common model for the viewer, Inspector and structured CLI/MCP mutations. Changes stay dirty until Save settings. A numeric drag creates one undo step. A clean document follows external metadata changes; a dirty document presents a conflict. Saving cannot overwrite an unacknowledged external change.
| Source role | Import meaning |
|---|---|
color |
Color RGB, configurable sRGB/linear encoding, linear alpha, premultiplication in linear space |
normal |
Linear data, no premultiplication; explicit normal_y=up/down convention |
height |
Linear data; chosen height channel, strength and Y convention can generate a normal artifact during import |
emission-rgb |
Straight RGB with explicit color-space semantics; texture alpha does not multiply the emission |
emission-mask |
Scalar data from the chosen channel, used with the material's emission color/intensity |
cookie-mask / mask |
Linear scalar mask from the chosen channel |
data |
Unmodified linear data channels |
A color source exposes Normal, Height source and Emission associations. Select a compatible source/frame or drag it from Assets. Compatibility checks include role, logical dimensions and pivot; independently packed maps keep their own UV/trim mapping. Disabled explicitly and Inherit / discover are different states. A missing explicit AssetID remains visible and can be repaired or removed; it never silently points at a different file.
A whole-sheet association is used by the importer to establish persistent frame-to-frame bindings. It is not a fallback that stretches an entire normal sheet across a single sprite. Missing frame mappings use the documented flat-normal/uniform-emission fallback. Automatic _n, _e or _em discovery resolves to IDs during import, and explicit mappings take priority.
Height settings belong to the height source and are shared by all of its consumers. Open that linked source to change height_channel, height_strength or normal_y. An explicit Normal association wins over Height. A raw Height reference with generation disabled retains its ID and reports why it cannot yet supply a normal.
Preview, Save and Undo
The Lit surface uses the prepared built-in Lit shader, the normal material cache and the actual renderer in a separate preview session. Drag within the surface to move the light. Height, color, intensity, ambient, Lit/Unlit, Normal/Emission and Flip X/Y controls affect that preview only. They do not call gameplay scripts, change the scene, create prefab overrides or save import settings. Normal maps transform correctly when flipped. Emission changes the surface's own light output and does not illuminate neighbours or produce Bloom. Without a GPU the ordinary image/metadata view remains available and the Lit preview explains the missing device.
For a height source, enable Generate normal at import and change its parameters. A private candidate is prepared from snapshots of the source image and dirty metadata. Generated normal candidate shows its raw pixels; the Lit surface uses the same prepared result. One request runs at a time and later edits replace the queued request. Failed imports or failed GPU uploads keep the previous valid preview. A changed source file, stale metadata, context generation or closed tab cannot publish an obsolete candidate.
Save settings validates the current height candidate before saving the metadata and applying the normal import/reload transaction. The PNG's pixels stay unchanged. After an explicit Save, Undo/Redo also prepares and atomically applies a working artifact generation to the running scene. The metadata buffer remains dirty and the disk version is unchanged until another explicit Save. A failed working import preserves the last-good runtime generation. Closing and discarding a working document restores saved resources. Strict editor export blocks dirty metadata, so an Undo preview cannot silently export the older disk version.
In examples/platformer, open assets/surfaces/platform.png, follow its Height source to platform_height.png, change strength, inspect the generated normal and Lit surface, then Save and Undo to compare the platform in the actual level. Open runner.png, select an existing frame and toggle Flip X/Y in the preview to inspect its linked normal frame. The lamp demonstrates a real emission-mask asset. These are the same assets included by native/web exports and the site's platformer demo.
Diagnostics
| Code | Meaning and repair |
|---|---|
TEX001 |
A setting, role, frame rectangle, dimension or channel pivot is invalid. Correct the typed value or assign a matching source/frame. |
TEX002 |
An explicit channel AssetID cannot be resolved. Restore the asset, choose another compatible ID or disable/reset the association. The original ID is preserved. |
TEX003 |
Candidate preparation or import failed. Read the accompanying importer diagnostic; the previous working generation remains active. |
The Channels Inspector, texture.get/schema/set/channel/channel-reset/reset/validate/apply commands and structured mutations use the same schema and validation. Asset dependencies and consumers are navigable from the image panel; imported artifact bytes are never an editable document.