I have specific problem in coding in GODOT(I'm using C#, I'm new to godot). I need to reference current node that has attached script. Let's say - I have 3 buttons and all of them inherits from base class called "menuButton" that has attached script called "menuScript" that includes code for changing text color onHover. And I need to reference current node, so that I can change the color of child label node.
this
Typically, you don't need to do this. Functions and parameters of the node can be accessed without a node reference
GetChild(i)
(shortened version of this.GetChild(i)
)GetName()
(shortened version of this.GetName()
)You may need to use this
for other functions that have a node parameter. Most notably:
- Connect("signal", this, "MyMethod")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With