Call deferred - can I reference a singleton function ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AltoWaltz


I have a singleton script and there is an importdata() function within the script. I am trying to get the timing of importing data right with call_deferred on this function within GameRoot node(and game options).

Can I do this and what is the syntax ? Tried with funcref but unable to make it work.

Not ok;


Also not ok:

var load_data_ref = funcref(DataImport,"importdata")

Any help appreciated.

:bust_in_silhouette: Reply From: avencherus

Hello, thank you for a reply. Still errors out:
E 0:00:06.791 _call_function: Error calling deferred method: ‘Node(’: Method not found…
<C++ Source> core/message_queue.cpp:253 @ _call_function()

AltoWaltz | 2020-12-22 08:43

Typo, the function name is importdata, try that.

avencherus | 2020-12-22 16:17

Great, thank you.

AltoWaltz | 2020-12-23 09:24