PropertyTooltipAttribute

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.

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

Requirements

Namespace: Sirenix.OdinInspector
Assembly: Sirenix.OdinInspector
Version: 1.0.4.1

See Also

  • TooltipAttribute

Constructors

Definition Description
PropertyTooltipAttribute(string) Adds a tooltip to the property in the inspector.

Properties

Return Type Definition Description
string Tooltip The message shown in the tooltip.

Example

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; }
}