Closed ghost closed 2 years ago
try not new RecoyxLogo, use RecoyxLogo.instance() instead? I still wonder if there is a chance to instance an image.
you should get an instance of the image when you import it
@Geequlim I tried:
await godot.yield(this.get_tree(), 'idle_frame');
console.log('a');
let recoyxLogo = RecoyxLogo;
console.log('b');
recoyxLogo.position = new godot.Vector2(0, 0);
console.log('c');
this.add_child(recoyxLogo);
console.log('d');
Did not log 'd' and did not show the image on the scene.
I also tried RecoyxLogo.instance()
as @Devilsparta said. When I use RecoyxLogo.instance()
, it doesn't log 'b'.
Finally I also tried let recoyxLogo = await import('res://img/company-logo/recoyx.png');
. It doesn't log 'c' nor show the image.
This code isn't fully executed with latest editor build (v3.2.3). Debugger has no errors.