![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | quangtran |
Something wrong but I don’t know where is, just simple some lines code, but nothing sprite show, thank for reading my post
var scene = (PackedScene)GD.Load("res://Node2D.tscn");
Node main_node = scene.Instance();
texture = (Texture)GD.Load("res://asset/images/tri_32.png");
sprite = (Sprite)main_node.GetNode("tri8");
sprite.Texture = texture;
var v = new Vector2(100,100);
sprite.Position = v;
main_node.AddChild(sprite);