using System; namespace UnityEngine.Animations.Rigging { /// /// This class holds the serialized data necessary to build /// a rig effector. This is saved in either the RigBuilder, or the Rig component. /// [Serializable] public class RigEffectorData { /// /// The effector visual style. /// [Serializable] public struct Style { /// The effector shape. This is represented by a Mesh. public Mesh shape; /// The effector main color. public Color color; /// The public float size; /// The position offset applied to the effector. public Vector3 position; /// The rotation offset applied to the effector. public Vector3 rotation; }; [SerializeField] private Transform m_Transform; [SerializeField] private Style m_Style = new Style(); [SerializeField] private bool m_Visible = true; /// The Transform represented by the effector. public Transform transform { get => m_Transform; } /// The visual style of the effector. public Style style { get => m_Style; } /// The visibility state of the effector. True if visible, false otherwise. public bool visible { get => m_Visible; set => m_Visible = value; } /// /// Initializes the effector with a Transform and a default style. /// /// The Transform represented by the effector. /// The visual style of the effector. public void Initialize(Transform transform, Style style) { m_Transform = transform; m_Style = style; } } }