Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

GD0110: The exported tool button is not a Callable

规则 ID

GD0110

类别

用法

修复是破坏性的还是非破坏性的

Breaking - If the property's type is changed to Callable

Non-breaking - If the [ExportToolButton] is replaced with [Export]

默认启用

原因

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

规则说明

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.

如何解决违规情况

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].

何时抑制警告

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.