private Create ( |
||
texture | ||
rect | ||
pivot | Vector2 | |
pixelsPerUnit | float | |
extrude | uint | |
meshType | SpriteMeshType | |
Результат |
public static Sprite Create(Texture2D texture, Rect rect, Vector2 pivot, float pixelsPerUnit, uint extrude, SpriteMeshType meshType)
{
Vector4 zero = Vector4.zero;
return INTERNAL_CALL_Create(texture, ref rect, ref pivot, pixelsPerUnit, extrude, meshType, ref zero);
}
Sprite::Create ( |
|
Sprite::Create ( |
|
Sprite::Create ( |
|
Sprite::Create ( |
public override object Revert(BinaryReader reader) { var type = reader.ReadByte(); if (type == 0) { return(DeserializeUnityAsset(typeof(Sprite), reader)); } if (type == 1) { Texture2D texture = null; var rect = default(Rect); var pivot = default(Vector2); var pixelsPerUnit = 100f; var border = default(Vector4); Deserialize(reader, ret => texture = (Texture2D)ret); Deserialize(reader, ret => rect = (Rect)ret); Deserialize(reader, ret => pivot = (Vector2)ret); pixelsPerUnit = reader.ReadSingle(); Deserialize(reader, ret => border = (Vector4)ret); return(Sprite.Create(texture, rect, pivot, pixelsPerUnit, 0, SpriteMeshType.Tight, border)); } throw new NotSupportedException("Invalid type: " + type); }