Fixed GetNode inconsistencies (#5056)

* Fixed GetNode inconsistencies (C#)

The generic method should be used instead. See #4794.
This commit is contained in:
BlueStag
2021-07-01 07:06:13 +01:00
committed by GitHub
parent 3f4e1f3a95
commit a090a578fb
3 changed files with 5 additions and 5 deletions

View File

@@ -83,7 +83,7 @@ There are two ways to load resources from code. First, you can use the ``load()`
public override void _Ready()
{
var texture = (Texture)GD.Load("res://robi.png"); // Godot loads the Resource when it reads the line.
var sprite = (Sprite)GetNode("sprite");
var sprite = GetNode<Sprite>("sprite");
sprite.Texture = texture;
}