Fix C# code example for Object._get_property_list
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.
This commit is contained in:
@ -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()
|
public override Godot.Collections.Array<Godot.Collections.Dictionary> _GetPropertyList()
|
||||||
{
|
{
|
||||||
@ -173,7 +173,7 @@
|
|||||||
if (propertyName.StartsWith("number_"))
|
if (propertyName.StartsWith("number_"))
|
||||||
{
|
{
|
||||||
int index = int.Parse(propertyName.Substring("number_".Length));
|
int index = int.Parse(propertyName.Substring("number_".Length));
|
||||||
numbers[index] = value.As<int>();
|
_numbers[index] = value.As<int>();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user