using System; namespace UnityEngine.Splines { /// /// Attribute used to make an integer variable show in the Inspector as a popup menu with spline choices relative /// to a . /// public class SplineIndexAttribute : PropertyAttribute { /// /// The name of the field that references an . /// public readonly string SplineContainerProperty; /// /// Creates a new SplineIndexAttribute with the name of a variable that references an . /// /// The name of the field that references an . /// It is recommended to pass this value using `nameof()` to avoid typos. public SplineIndexAttribute(string splineContainerProperty) { SplineContainerProperty = splineContainerProperty; } } /// /// Describes the fields on an type. /// [Flags] public enum EmbeddedSplineDataField { /// The that holds the collection. Container = 1 << 0, /// The index of the in the referenced . SplineIndex = 1 << 1, /// A string value used to identify and access stored on a . Key = 1 << 2, /// The for the target . Type = 1 << 3, /// All fields will be shown in the Inspector. All = 0xFF } /// /// Attribute used to make an variable show in the Inspector with a filtered set /// of fields editable. Use this in situations where you want to specify parameters /// in code and not allow them to be modified in the Inspector. /// to a . /// public class EmbeddedSplineDataFieldsAttribute : PropertyAttribute { /// /// The fields to show in the Inspector. /// public readonly EmbeddedSplineDataField Fields; /// /// Create an attribute. /// /// The fields to show in the Inspector. . public EmbeddedSplineDataFieldsAttribute(EmbeddedSplineDataField fields) { Fields = fields; } } }