ScriptablePacker
ScriptablePacker Interface. Provides a custom implementation to pack sprites into textures. This is the Scriptable Packer interface.
Read time 4 minutesLast updated 5 days ago
Definition
- Type: Class
- Namespace: UnityEditor.U2D
- Assembly: UnityEditor.CoreModule
- Inherits from: ScriptableObject
public abstract class ScriptablePacker : ScriptableObject
Methods
Method | Description |
|---|---|
| Dispose | Helper function to cleanup native arrays of PackerData struct. |
| Fit | Function to query where the Sprites will be packed in an Atlas without generating textures. Used for tools and previews. |
| Pack | Allows custom implementation to pack sprites into textures. |
Structs
Struct | Description |
|---|---|
| ScriptablePacker.PackerData | A struct containing input data to pack sprites. |
| ScriptablePacker.SpriteData | A struct containing sprite specific data to pack sprites. |
| ScriptablePacker.SpritePack | A struct that contains packing information of the sprite to Atlas. |
| ScriptablePacker.TextureData | Texture data of a specific sprite useful to get source pixels in textureData array. |
Enums
Enum | Description |
|---|---|
| ScriptablePacker.PackTransform | Indicates if the Sprite is rotated when packed to SpriteAtlas. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |