docs.unity3d.com
    Show / Hide Table of Contents

    Class SpriteSkin

    Deforms the Sprite that is currently assigned to the SpriteRenderer in the same GameObject

    Inheritance
    Object
    SpriteSkin
    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()
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023