public record class SpriteRectOne sprite cut out of a texture, as the sidecar records it.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Primitives rather than the engine's own structs, and that is the sidecar talking. A Rectangle is four readonly fields with no setter and a NineSlice is a positional record; the YAML binder builds a settings object by writing its members, so either of them here would round-trip as a key the reader could not fill in. Written out flat, a sprite in a .meta is eleven scalars a human can read and edit, which is what a sidecar is for. Region, Pivot and Border put the engine's shapes back on top, and are computed rather than stored so nothing has two answers.
⚠ Texels of the source image, not of the shipped texture. A texture over MaxSize ships halved, and the rects are not rescaled to match — they do not need to be. A UV is a region divided by the texture's size and both halve together, so the sprite samples the same picture either way, and its world size stays what the artist drew at the resolution they drew it. Rescaling would round every rect to a texel grid it was not authored on, once per halving.
Fields and properties (15)
public string NameWhat the sprite is called. This is what a reference to it resolves by.
public int XIts left edge, in texels from the left.
public int YIts top edge, in texels from the top.
public int WidthHow wide it is, in texels.
public int HeightHow tall it is, in texels.
public float PivotXWhere its origin sits, as a fraction from the bottom-left.
public float PivotYThe same, vertically.
public int BorderLeftHow far the nine-slice's left border reaches in, in texels.
public int BorderTopThe same, from the top.
public int BorderRightThe same, from the right.
public int BorderBottomThe same, from the bottom.
public Rectangle RegionWhere it is, as the shape the rest of the engine uses.
public Vector2 PivotIts pivot, as the shape the rest of the engine uses.
public NineSlice BorderIts border, as the shape the rest of the engine uses.
public bool IsEmptyWhether it encloses anything.
Methods (2)
Used by (13)
- SpriteDocumentTestsVixen.Editor.AssetEditors.Tests
- SpriteEditCommandVixen.Editor.AssetEditors
- SpriteSheetViewVixen.Editor.AssetEditors
- SpriteSlicerVixen.Editor.Assets
- SpriteSlicerTestsVixen.Editor.Assets.Tests
- SpriteViewTestsVixen.Editor.AssetEditors.Tests
- TextureImportDocumentVixen.Editor.AssetEditors
- TextureImportEditsVixen.Editor.AssetEditors
- TextureImportSettingsVixen.Editor.Assets
- TextureImporterVixen.Editor.Assets
- TextureImporterTestsVixen.Editor.Assets.Tests
- TypeRegistrationVixen.Editor.Assets
- Vixen_Editor_AssetEditors_Importing_TextureImportEditsSerializerVixen.Editor.AssetEditors