Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | CybrNight |
Hello,
I have noticed an issue with Line2D when working in C#. I noticed that the points do not update properly when setting the Points array property on the Line2D class.
This does not work:
someLine2D.Points[0] = new Vector2(10, 10);
someLine2D.Points[1] = new Vector2(10, 15);
However ironically enough using the obsolete SetPoints function DOES work:
someLine2D.SetPoints(new Vector2[]{new Vector2(10, 10), new Vector2(10, 15)});
Manually setting the points also works as expected when in GD Script. The issue is only in C# when trying to manually set the points of the Line2D. When in C# the values do not change and stay at (0,0). What could be causing this, and is there a workaround besides what I am doing right now and having the code that controls the Line2D in GD Script for now. Something is not allowing the array to update. Thanks.