Delay as node sub-graph?

Options
Ines Hilz
Ines Hilz Posts: 38 🔥
edited May 2022 in Programming #1

Hi all :)
I am using this script as a custom node in my visual scripts to delay an event:

// DelayedCall.js
// @input float delay
// @output execution callback
if (script.callback) {
    var evt = script.createEvent("DelayedCallbackEvent");
    evt.bind(script.callback);
    evt.reset(script.delay);
 }

but if i export my visual script and import it into other projects, this custom delay node always gets deleted an is only visible as an empty custom node.
So i want to rebuild this script in nodes so it will get exported correctly in future projects.
But how?
( I'd attach a picture here of the nodes i already tried, but the forum doesn't allow me anymore :c @sxu
I uploaded it on the old forum : https://support.lensstudio.snapchat.com/hc/en-us/community/posts/6474005917972-Delay-as-node-sub-graph- )

Best Answer

  • stevenxu
    stevenxu Posts: 603 👻
    #2 Answer ✓
    Options

    @Ines Hilz This is a bug and there's a fix in progress for it.

    In the meantime, here's a fix provided by one of our team members:

Answers