C# Class UnityEngine.Sprite

Represents a Sprite object for use in 2D gameplay.

Inheritance: UnityEngine.Object
ファイルを表示 Open project: CarlosHBC/UnityDecompiled Class Usage Examples

Public Methods

Method Description
Create ( Texture2D texture, Rect rect, Vector2 pivot, [ pixelsPerUnit, [ extrude, [ meshType, [ border ) : Sprite

Create a new Sprite object.

Private Methods

Method Description
Create ( Texture2D texture, Rect rect, Vector2 pivot ) : Sprite
Create ( Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit ) : Sprite
Create ( Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude ) : Sprite
Create ( Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude, SpriteMeshType meshType ) : Sprite
INTERNAL_CALL_Create ( Texture2D texture, Rect &rect, Vector2 &pivot, float pixelsPerUnit, uint extrude, SpriteMeshType meshType, Vector4 &border ) : Sprite
INTERNAL_get_border ( Vector4 &value ) : void
INTERNAL_get_bounds ( Bounds &value ) : void
INTERNAL_get_rect ( Rect &value ) : void
INTERNAL_get_textureRect ( Rect &value ) : void
Internal_GetPivot ( Sprite sprite, Vector2 &output ) : void
Internal_GetTextureRectOffset ( Sprite sprite, Vector2 &output ) : void
OverrideGeometry ( Vector2 vertices, ushort triangles ) : void

Method Details

Create() public static method

Create a new Sprite object.

public static Create ( Texture2D texture, Rect rect, Vector2 pivot, [ pixelsPerUnit, [ extrude, [ meshType, [ border ) : Sprite
texture Texture2D Texture from which to obtain the sprite graphic.
rect Rect Rectangular section of the texture to use for the sprite.
pivot Vector2 Sprite's pivot point relative to its graphic rectangle.
pixelsPerUnit [ The number of pixels in the sprite that correspond to one unit in world space.
extrude [ Amount by which the sprite mesh should be expanded outwards.
meshType [ Controls the type of mesh generated for the sprite.
border [ The border sizes of the sprite (X=left, Y=bottom, Z=right, W=top).
return Sprite