Namespace: | Sirenix.OdinInspector |
Assembly: | Sirenix.OdinInspector.Attributes |
[DontApplyToListElements]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Parameter | AttributeTargets.Delegate | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter | AttributeTargets.All, AllowMultiple = false, Inherited = true)]
[Conditional("UNITY_EDITOR")]
public sealed class PropertyTooltipAttribute : Attribute, _Attribute
PropertyTooltip is used on any property, and creates tooltips for when hovering the property in the inspector.
Use this to explain the purpose, or how to use a property.
This is similar to Unity's UnityEngine.TooltipAttribute but can be applied to both fields and properties.
The following example shows how PropertyTooltip is applied to various properties.
public class MyComponent : MonoBehaviour
{
[PropertyTooltip("This is an int property.")]
public int MyField;
[ShowInInspector, PropertyTooltip("This is another int property.")]
public int MyProperty { get; set; }
}
public PropertyTooltipAttribute(string tooltip)
System.String | tooltip | The message shown in the tooltip. |
public string Tooltip