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 : Le membre exporté est statique
Rule ID |
GD0101 |
Catégorie |
Utilisation |
Fix is breaking or non-breaking |
Breaking - If the Non-breaking - If the |
Activé par défaut |
Oui |
Cause
Un membre statique est annoté avec l'attribut [Export]. Les membres statiques ne peuvent pas être exportés.
Rule description
Godot n'autorise pas l'export des membres statiques.
// Static members can't be exported.
[Export]
public static int InvalidProperty { get; set; }
// Instance members can be exported.
[Export]
public int ValidProperty { get; set; }
How to fix violations
Pour corriger une violation de cette règle, supprimez l'attribut [Export] ou supprimez le mot-clé static.
Quand supprimer les avertissements
Do not suppress a warning from this rule. Static members can't be exported so they will be ignored by Godot, resulting in runtime errors.