Replies: 2 comments
-
|
At first, have you read the documentation ? For example, if you emit a signal in “_ready()”, it is immediately sent on “add_child()” call. Do expecting to catch the signal using # start to watch on the emitter to collect all emitted signals
var emitter_a := monitor_signals(MyEmitter.new())
# emit signal `my_signal_a` on emitter_a
emitter_a.do_emit_a()
await assert_signal(emitter_a).is_emitted('my_signal_a')Here is an example to wait for signal |
Beta Was this translation helpful? Give feedback.
-
|
@h-lober it is answering your questions? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Man, I'm at a loss here. Following the documentation I tried to catch a signal of a scene with a scene runner but i can't make it work.
the signal definition in the class of ob is just
signal transform_changed
here are the variations I tried:
also later the signal will emit a "Transform2D" and i would like to know if it just emitted the signal regardless of the exact parameter
would I ask for
await sr.await_signal_on(ob, "transform_changed", [any()], 100)
or something else?
GDUnit4 has been a blast to use but everything to do with asserting signals is very frustrating to me atm
Can anyone give me some guidance on this please?
Beta Was this translation helpful? Give feedback.
All reactions