Skip to content

Commit

Permalink
Fix C# code example for Object._get_property_list
Browse files Browse the repository at this point in the history
There were two small errors in this code example that kept it from working when copied to a new node locally. These are the fixes I used locally to test the example.
  • Loading branch information
jwodicka committed Aug 26, 2024
1 parent e3550cb commit 97cf2c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/classes/Object.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@
}
}

private List<int> _numbers = new();
private Godot.Collections.Array<int> _numbers = new();

public override Godot.Collections.Array<Godot.Collections.Dictionary> _GetPropertyList()
{
Expand Down Expand Up @@ -173,7 +173,7 @@
if (propertyName.StartsWith("number_"))
{
int index = int.Parse(propertyName.Substring("number_".Length));
numbers[index] = value.As<int>();
_numbers[index] = value.As<int>();
return true;
}
return false;
Expand Down

0 comments on commit 97cf2c1

Please sign in to comment.