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:匯出的工具按鈕的型別不是 Callable

規則 ID

GD0110

分類

用法

修正是否會破壞相容性

破壞性變更-若將屬性的型別改成 Callable

非破壞性變更-若以 [Export] 取代 [ExportToolButton]

預設啟用

原因

某個屬性的型別不是 Callable,卻被標註了 [ExportToolButton] 屬性。

規則說明

[ExportToolButton] 用來在屬性檢視器中建立可點擊的按鈕,因此該屬性必須是 Callable,以便在按下按鈕時於編輯器中執行。

修正方式

要修正此違規,請將該屬性的型別改為 Callable。或者,如果你原本是要匯出一般屬性,請將 [ExportToolButton] 替換為 [Export]

什麼時候應該忽略警告

請勿忽略此規則的警告。匯出的屬性必須是 Callable,才能在屬性檢視器中按下該按鈕時於編輯器內執行。