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.
Checking the stable version of the documentation...
GD0101: Il membro esportato è statico
ID regola |
GD0101 |
Categoria |
Utilizzo |
Soluzione è distruttiva o non-distruttiva |
Distruttiva - Se la parola chiave Non-distruttiva - Se l'attributo |
Abilitato per predefinito |
Si |
Causa
Un membro statico è annotato con l'attributo [Export]. Non è possibile esportare i membri statici.
Descrizione della regola
Godot non permette di esportare i membri statici.
// Static members can't be exported.
[Export]
public static int InvalidProperty { get; set; }
// Instance members can be exported.
[Export]
public int ValidProperty { get; set; }
Come risolvere le violazioni
Per correggere una violazione di questa regola, rimuovere l'attributo [Export] o rimuovere la parola chiave static.
Quando sopprimere gli avvertimenti
Non sopprimere un avviso da questa regola. Non è possibile esportare i membri statici, quindi saranno ignorati da Godot, causando errori in fase di esecuzione.