Line2D attributes

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By ashish

How can I change the colour and width of a Line2D node through code?
Does it have Methods to call to give effect to colour and width change? Or, does this happens only through the Inspector?

:bust_in_silhouette: Reply From: dancaer69

You can access its properties as you can do in all other nodes.
For color for example is this:

default_color [default: Color( 0.4, 0.5, 1, 1 )]
set_default_color(value) setter 
get_default_color() getter

Thanks. This works

ashish | 2021-04-08 12:59