WrapAttribute

Wrap is used on most primitive property, and allows for wrapping the value when it goes out of the defined range.

Use this when you want a value that goes around in circle, like for example an angle.

namespace Sirenix.OdinInspector
{
[AttributeUsageAttribute((AttributeTargets)32767, AllowMultiple = False, Inherited = True)]
public sealed class WrapAttribute : Attribute
}

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 2.0.0.0

See Also

  • !:AngleWrapAttribute

Fields

Return Type Definition Description
double Max The highest value for the property.
double Min The lowest value for the property.

Constructors

Definition Description
WrapAttribute(double, double) Wraps the value of the property round when the values goes out of range.

Example

The following example show how Wrap is used on a property.

public class MyComponent : MonoBehaviour
{
	[Wrap(-100, 100)]
	public float MyFloat;
}