C# 클래스 Spine.Unity.Modules.AttachmentTools.AttachmentRegionExtensions

파일 보기 프로젝트 열기: EsotericSoftware/spine-runtimes

공개 메소드들

메소드 설명
GetRegion ( this attachment ) : AtlasRegion

Tries to get the region (image) of a renderable attachment. If the attachment is not renderable, it returns null.

SetPositionOffset ( this regionAttachment, Vector2 offset ) : void

Sets the position offset. Call regionAttachment.UpdateOffset to apply the change.

SetPositionOffset ( this regionAttachment, float x, float y ) : void

Sets the position offset. Call regionAttachment.UpdateOffset to apply the change.

SetRegion ( this attachment, AtlasRegion region, bool updateOffset = true ) : void

Tries to set the region (image) of a renderable attachment. If the attachment is not renderable, nothing is applied.

SetRotation ( this regionAttachment, float rotation ) : void

Sets the rotation. Call regionAttachment.UpdateOffset to apply the change.

SetScale ( this regionAttachment, Vector2 scale ) : void

Sets the scale. Call regionAttachment.UpdateOffset to apply the change.

SetScale ( this regionAttachment, float x, float y ) : void

Sets the scale. Call regionAttachment.UpdateOffset to apply the change.

ToRegionAttachment ( this sprite, AtlasPage page ) : RegionAttachment

Creates a RegionAttachment based on a sprite. This method creates a real, usable AtlasRegion. That AtlasRegion uses the AtlasPage provided.///

ToRegionAttachment ( this sprite, Material material ) : RegionAttachment

Creates a RegionAttachment based on a sprite. This method creates a real, usable AtlasRegion. That AtlasRegion uses a new AtlasPage with the Material provided.///

ToRegionAttachment ( this region, string attachmentName, float scale = 0.01f ) : RegionAttachment

Creates a new RegionAttachment from a given AtlasRegion.

ToRegionAttachmentPMAClone ( this sprite, Shader shader ) : RegionAttachment

Creates a Spine.AtlasRegion that uses a premultiplied alpha duplicate texture of the Sprite's texture data. Returns a RegionAttachment that uses it. Use this if you plan to use a premultiply alpha shader such as "Spine/Skeleton"

메소드 상세

GetRegion() 공개 정적인 메소드

Tries to get the region (image) of a renderable attachment. If the attachment is not renderable, it returns null.
public static GetRegion ( this attachment ) : AtlasRegion
attachment this
리턴 AtlasRegion

SetPositionOffset() 공개 정적인 메소드

Sets the position offset. Call regionAttachment.UpdateOffset to apply the change.
public static SetPositionOffset ( this regionAttachment, Vector2 offset ) : void
regionAttachment this
offset UnityEngine.Vector2
리턴 void

SetPositionOffset() 공개 정적인 메소드

Sets the position offset. Call regionAttachment.UpdateOffset to apply the change.
public static SetPositionOffset ( this regionAttachment, float x, float y ) : void
regionAttachment this
x float
y float
리턴 void

SetRegion() 공개 정적인 메소드

Tries to set the region (image) of a renderable attachment. If the attachment is not renderable, nothing is applied.
public static SetRegion ( this attachment, AtlasRegion region, bool updateOffset = true ) : void
attachment this
region AtlasRegion
updateOffset bool
리턴 void

SetRotation() 공개 정적인 메소드

Sets the rotation. Call regionAttachment.UpdateOffset to apply the change.
public static SetRotation ( this regionAttachment, float rotation ) : void
regionAttachment this
rotation float
리턴 void

SetScale() 공개 정적인 메소드

Sets the scale. Call regionAttachment.UpdateOffset to apply the change.
public static SetScale ( this regionAttachment, Vector2 scale ) : void
regionAttachment this
scale UnityEngine.Vector2
리턴 void

SetScale() 공개 정적인 메소드

Sets the scale. Call regionAttachment.UpdateOffset to apply the change.
public static SetScale ( this regionAttachment, float x, float y ) : void
regionAttachment this
x float
y float
리턴 void

ToRegionAttachment() 공개 정적인 메소드

Creates a RegionAttachment based on a sprite. This method creates a real, usable AtlasRegion. That AtlasRegion uses the AtlasPage provided.///
public static ToRegionAttachment ( this sprite, AtlasPage page ) : RegionAttachment
sprite this
page AtlasPage
리턴 RegionAttachment

ToRegionAttachment() 공개 정적인 메소드

Creates a RegionAttachment based on a sprite. This method creates a real, usable AtlasRegion. That AtlasRegion uses a new AtlasPage with the Material provided.///
public static ToRegionAttachment ( this sprite, Material material ) : RegionAttachment
sprite this
material UnityEngine.Material
리턴 RegionAttachment

ToRegionAttachment() 공개 정적인 메소드

Creates a new RegionAttachment from a given AtlasRegion.
public static ToRegionAttachment ( this region, string attachmentName, float scale = 0.01f ) : RegionAttachment
region this
attachmentName string
scale float
리턴 RegionAttachment

ToRegionAttachmentPMAClone() 공개 정적인 메소드

Creates a Spine.AtlasRegion that uses a premultiplied alpha duplicate texture of the Sprite's texture data. Returns a RegionAttachment that uses it. Use this if you plan to use a premultiply alpha shader such as "Spine/Skeleton"
public static ToRegionAttachmentPMAClone ( this sprite, Shader shader ) : RegionAttachment
sprite this
shader UnityEngine.Shader
리턴 RegionAttachment