Class SpriteSkin
Deforms the Sprite that is currently assigned to the SpriteRenderer in the same GameObject
Namespace: UnityEngine.U2D.Animation
Syntax
public sealed class SpriteSkin : MonoBehaviour, ISerializationCallbackReceiver, MonoBehaviour
Properties
alwaysUpdate
Determines if the SpriteSkin executes even if the associated SpriteRenderer has been culled from view.
Declaration
public bool alwaysUpdate { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
boneTransforms
Returns the Transform Components that is used for deformation
Declaration
public Transform[] boneTransforms { get; }
Property Value
Type | Description |
---|---|
Transform[] | An array of Transform Components |
rootBone
Returns the Transform Component that represents the root bone for deformation
Declaration
public Transform rootBone { get; }
Property Value
Type | Description |
---|---|
Transform | A Transform Component |
Methods
GetDeformedVertexPositionData()
Gets an enumerable to iterate through all deformed vertex positions of this SpriteSkin.
Declaration
public IEnumerable<Vector3> GetDeformedVertexPositionData()
Returns
Type | Description |
---|---|
IEnumerable<Vector3> | Returns an IEnumerable to deformed vertex positions. |
GetDeformedVertexTangentData()
Gets an enumerable to iterate through all deformed vertex tangents of this SpriteSkin.
Declaration
public IEnumerable<Vector4> GetDeformedVertexTangentData()
Returns
Type | Description |
---|---|
IEnumerable<Vector4> | Returns an IEnumerable to deformed vertex tangents. |
HasCurrentDeformedVertices()
Returns whether this SpriteSkin has currently deformed vertices.
Declaration
public bool HasCurrentDeformedVertices()
Returns
Type | Description |
---|---|
Boolean | Returns true if this SpriteSkin has currently deformed vertices. Returns false otherwise. |
OnAfterDeserialize()
Called after object is deserialized.
Declaration
public void OnAfterDeserialize()
OnBeforeSerialize()
Called before object is serialized.
Declaration
public void OnBeforeSerialize()