Class Sprite
Assembly: UnityEngine.dll
Syntax
public sealed class Sprite : Object
Properties
associatedAlphaSplitTexture
Declaration
public Texture2D associatedAlphaSplitTexture { get; }
Property Value
border
Declaration
public Vector4 border { get; }
Property Value
bounds
Declaration
public Bounds bounds { get; }
Property Value
|
Improve this Doc
View Source
packed
Declaration
public bool packed { get; }
Property Value
|
Improve this Doc
View Source
packingMode
Declaration
public SpritePackingMode packingMode { get; }
Property Value
|
Improve this Doc
View Source
packingRotation
Declaration
public SpritePackingRotation packingRotation { get; }
Property Value
pivot
Declaration
public Vector2 pivot { get; }
Property Value
pixelsPerUnit
Declaration
public float pixelsPerUnit { get; }
Property Value
rect
Declaration
public Rect rect { get; }
Property Value
texture
Declaration
public Texture2D texture { get; }
Property Value
|
Improve this Doc
View Source
textureRect
Declaration
public Rect textureRect { get; }
Property Value
|
Improve this Doc
View Source
textureRectOffset
Declaration
public Vector2 textureRectOffset { get; }
Property Value
triangles
Declaration
public ushort[] triangles { get; }
Property Value
uv
Declaration
public Vector2[] uv { get; }
Property Value
vertices
Declaration
public Vector2[] vertices { get; }
Property Value
Methods
|
Improve this Doc
View Source
Create(Texture2D, Rect, Vector2)
Declaration
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot)
Parameters
Returns
|
Improve this Doc
View Source
Create(Texture2D, Rect, Vector2, Single)
Declaration
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit)
Parameters
Returns
|
Improve this Doc
View Source
Create(Texture2D, Rect, Vector2, Single, UInt32)
Declaration
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude)
Parameters
Returns
|
Improve this Doc
View Source
Create(Texture2D, Rect, Vector2, Single, UInt32, SpriteMeshType)
Declaration
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude, SpriteMeshType meshType)
Parameters
Returns
|
Improve this Doc
View Source
Create(Texture2D, Rect, Vector2, Single, UInt32, SpriteMeshType, Vector4)
Declaration
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude, SpriteMeshType meshType, Vector4 border)
Parameters
Returns
|
Improve this Doc
View Source
Create(Texture2D, Rect, Vector2, Single, UInt32, SpriteMeshType, Vector4, Boolean)
Declaration
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude, SpriteMeshType meshType, Vector4 border, bool generateFallbackPhysicsShape)
Parameters
Returns
|
Improve this Doc
View Source
GetPhysicsShape(Int32, List<Vector2>)
Declaration
public int GetPhysicsShape(int shapeIdx, List<Vector2> physicsShape)
Parameters
Returns
GetPhysicsShapeCount()
Declaration
public int GetPhysicsShapeCount()
Returns
|
Improve this Doc
View Source
GetPhysicsShapePointCount(Int32)
Declaration
public int GetPhysicsShapePointCount(int shapeIdx)
Parameters
Type |
Name |
Description |
Int32 |
shapeIdx |
|
Returns
OverrideGeometry(Vector2[], UInt16[])
Declaration
public void OverrideGeometry(Vector2[] vertices, ushort[] triangles)
Parameters
|
Improve this Doc
View Source
OverridePhysicsShape(IList<Vector2[]>)
Declaration
public void OverridePhysicsShape(IList<Vector2[]> physicsShapes)
Parameters
Extension Methods