Méthode | Description | |
---|---|---|
GetRepackedSkin ( this o, string newName, |
Creates and populates a duplicate skin with cloned attachments that are backed by a new packed texture atlas comprised of all the regions from the original skin. No Spine.Atlas object is created so there is no way to find AtlasRegions except through the Attachments using them. |
|
ToAtlasRegion ( this s, AtlasPage page ) : AtlasRegion |
Creates a Spine.AtlasRegion from a UnityEngine.Sprite.
|
|
ToAtlasRegion ( this s, |
Creates a Spine.AtlasRegion from a UnityEngine.Sprite. This creates a new AtlasPage object for every AtlasRegion you create. You can centralize Material control by creating a shared atlas page using Material.ToSpineAtlasPage and using the sprite.ToAtlasRegion(AtlasPage) overload.
|
|
ToAtlasRegionPMAClone ( this s, |
Creates a Spine.AtlasRegion that uses a premultiplied alpha duplicate of the Sprite's texture data.
|
|
ToSpineAtlasPage ( this m ) : AtlasPage |
Creates a new Spine.AtlasPage from a UnityEngine.Material. If the material has a preassigned texture, the page width and height will be set.
|
|
ToSprite ( this ar, float pixelsPerUnit = 100 ) : |
Méthode | Description | |
---|---|---|
ApplyPMA ( this texture, bool applyImmediately = true ) : void | ||
GetAtlasRegion ( this a ) : AtlasRegion |
Tries to get the backing AtlasRegion of an attachment if it is renderable. Returns null for non-renderable attachments.
|
|
GetMainTexture ( this region ) : |
Convenience method for getting the main texture of the material of the page of the region.
|
|
GetSpineAtlasRect ( this region, bool includeRotate = true ) : |
Returns a Rect of the AtlasRegion according to Spine texture coordinates. (x-right, y-down)
|
|
GetUnityRect ( this region ) : |
Gets the Rect of an AtlasRegion according to Unity texture coordinates (x-right, y-up). This overload relies on region.page.height being correctly set.
|
|
GetUnityRect ( this region, int textureHeight ) : |
Gets the Rect of an AtlasRegion according to Unity texture coordinates (x-right, y-up).
|
|
InverseLerp ( float a, float b, float value ) : float | ||
IsRenderable ( Attachment a ) : bool | ||
SpineUnityFlipRect ( this rect, int textureHeight ) : |
Get a rect with flipped Y so that a Spine atlas rect gets converted to a Unity Sprite rect and vice versa.
|
|
TextureRectToUVRect ( |
Normalize a texture Rect into UV coordinates.
|
|
ToAtlasRegion ( this s, bool isolatedTexture = false ) : AtlasRegion | ||
ToTexture ( this ar, bool applyImmediately = true ) : |
||
UVRectToAtlasRegion ( |
Creates a new Spine AtlasRegion according to a Unity UV Rect (x-right, y-up, uv-normalized).
|
|
UVRectToTextureRect ( |
Denormalize a uvRect into a texture-space Rect.
|
public static GetRepackedSkin ( this o, string newName, |
||
o | this | |
newName | string | |
shader | ||
m | ||
t | ||
maxAtlasSize | int | |
padding | int | |
Résultat | Skin |
public static ToAtlasRegion ( this s, AtlasPage page ) : AtlasRegion | ||
s | this | |
page | AtlasPage | |
Résultat | AtlasRegion |
public static ToAtlasRegion ( this s, |
||
s | this | |
material | ||
Résultat | AtlasRegion |
public static ToAtlasRegionPMAClone ( this s, |
||
s | this | |
shader | ||
Résultat | AtlasRegion |
public static ToSpineAtlasPage ( this m ) : AtlasPage | ||
m | this | |
Résultat | AtlasPage |
public static ToSprite ( this ar, float pixelsPerUnit = 100 ) : |
||
ar | this | |
pixelsPerUnit | float | |
Résultat |