Merge pull request #95341 from esainane/valid-example

Fix check in `Object._ValidateProperty` example
This commit is contained in:
Rémi Verschelde 2024-08-12 14:10:32 +02:00
commit f16c3d13b4
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -341,7 +341,7 @@
public override void _ValidateProperty(Godot.Collections.Dictionary property)
{
if (property["name"].AsStringName() == PropertyName.Number && IsNumberEditable)
if (property["name"].AsStringName() == PropertyName.Number && !IsNumberEditable)
{
var usage = property["usage"].As<PropertyUsageFlags>() | PropertyUsageFlags.ReadOnly;
property["usage"] = (int)usage;