Closed ghost closed 2 years ago
What is the console.log(RecoyxLogo )
?
It logs [StreamTexture:1189]
.
You don't need to instantiate the image. Just use it as an instantiated instance.
Yeah, I tried it, as stated on the top of my issue... Nothing is drawn on the screen and some logs don't occur...
You'd better learn how to use godot first.
My code is correct, I didn't try to do the same in GDScript, though. It seems like it's an issue with QuickJS.
No it is not an issue. [StreamTexture:1189]
is a resource not a node.
That makes sense, but why doesn't console.log()
occur or why is not an error thrown and logged in the debugger console?
I mean, if the last console.log()
doesn't happen, then some error should have been thrown.
Now code fully works, but I still don't understand why it was silent.
Problem
I tried importing an image instance in different ways:
import image from 'res://img/img.png';
import Image from 'res://img/img.png'; let image = Image.instance();
import Image from 'res://img/img.png'; let image = new Image;
let image = await import('res://img/img.png');
None of these ways allow to show the image and, in some cases, code is not fully executed (using
console.log()
).Editor version
3.2.3
How to reproduce
states/InitialState.jsx
sceneInvolved code: