Skip to content

GD0110: The exported tool button is not a Callable ​

Value
Rule IDGD0110
CategoryUsage
Fix is breaking or non-breakingBreaking - If the property's type is changed to Callable
Non-breaking - If the [ExportToolButton] is replaced with [Export]
Enabled by defaultYes

Cause ​

A property of a type different from Callable is annotated with the [ExportToolButton] attribute.

Rule description ​

The [ExportToolButton] attribute is used to create clickable buttons in the inspector so, the property must be a Callable that will be executed when clicking the button.

How to fix violations ​

To fix a violation of this rule, change the type of the property to Callable. Alternatively, if you intended to export a normal property, replace the [ExportToolButton] attribute with [Export].

When to suppress warnings ​

Do not suppress a warning from this rule. The exported property must be a Callable so it can executed in the editor when clicking the button in the inspector.