Class SpriteRect
Abstract class that is used by systems to encapsulate Sprite data representation. Currently this is used by Sprite Editor Window.
Assembly: Unity.2D.Sprite.Editor.dll
Syntax
[Serializable]
public class SpriteRect
Properties
alignment
SpriteAlignment that represents the pivot value for the Sprite data.
Declaration
public SpriteAlignment alignment { get; set; }
Property Value
border
Returns a Vector4 that represents the border of the Sprite data.
Declaration
public Vector4 border { get; set; }
Property Value
customData
Gets and sets the custom sprite data.
Declaration
public string customData { get; set; }
Property Value
name
Declaration
public string name { get; set; }
Property Value
pivot
Declaration
public Vector2 pivot { get; set; }
Property Value
rect
Declaration
public Rect rect { get; set; }
Property Value
spriteID
Declaration
public GUID spriteID { get; set; }
Property Value
Methods
GetSpriteIDFromSerializedProperty(SerializedProperty)
Helper method to get SpriteRect.spriteID from a SerializedProperty.
Declaration
public static GUID GetSpriteIDFromSerializedProperty(SerializedProperty sp)
Parameters
Returns
Type |
Description |
GUID |
GUID for the SpriteRect.
|