Class SpriteSkin
Deforms the Sprite that is currently assigned to the SpriteRenderer in the same GameObject.
Inherited Members
Namespace: UnityEngine.U2D.Animation
Assembly: solution.dll
Syntax
[Preserve]
[ExecuteInEditMode]
[DefaultExecutionOrder(-1)]
[DisallowMultipleComponent]
[RequireComponent(typeof(SpriteRenderer))]
[AddComponentMenu("2D Animation/Sprite Skin")]
[Icon("Packages/com.unity.2d.animation/Editor/Assets/ComponentIcons/Animation.SpriteSkin.png")]
[MovedFrom("UnityEngine.U2D.Experimental.Animation")]
[HelpURL("https://docs.unity.cn/Packages/com.unity.2d.animation@9.0/manual/SpriteSkin.html")]
public sealed class SpriteSkin : MonoBehaviour, IPreviewable, ISerializationCallbackReceiver
Properties
| Name | Description |
|---|---|
| alwaysUpdate | Determines if the SpriteSkin executes even if the associated SpriteRenderer has been culled from view. |
| autoRebind | Get and set the Auto Rebind property. When enabled, Sprite Skin attempts to automatically locate the Transform that is needed for the current Sprite assigned to the Sprite Renderer. |
| boneTransforms | Returns the Transform Components that is used for deformation. Do not modify elements of the returned array. |
| rootBone | Returns the Transform Component that represents the root bone for deformation. |
Methods
| Name | Description |
|---|---|
| GetDeformedVertexPositionData() | Gets an enumerable to iterate through all deformed vertex positions of this SpriteSkin. |
| GetDeformedVertexTangentData() | Gets an enumerable to iterate through all deformed vertex tangents of this SpriteSkin. |
| HasCurrentDeformedVertices() | Returns whether this SpriteSkin has currently deformed vertices. |
| OnAfterDeserialize() | Called after object is deserialized. |
| OnBeforeSerialize() | Called before object is serialized. |