Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
135 stars 2 forks source link

Changing Parent Value Of Child Slots Makes Fire On Change Fail. #2834

Open AmasterAmaster opened 1 month ago

AmasterAmaster commented 1 month ago

Describe the bug?

When changing the child slot reference inputs for the Get Parent Slot node while also connected to a Fire On Change node, there will not be an impulse.

This happens every time when making a fresh new world (tested on a grid world), setting it up exactly like this will make it fail. I have tested it with the following nodes and methods to see if it would make it work:

Another strange thing about this: After connecting the multiplex to the node group (before the Get Parent Slot node), it works, then I removed that node, and it continued to work. So there is something with multiplex that makes these set of nodes respond better. I don't know what is happening under the hood with that, but that can be a lead.

To Reproduce

Additional steps to temporary remove the bug in the world:

Expected behavior

Switching child slot references should make this Fire On Change node pulse when detecting a different parent.

Screenshots

2024-08-29 15 30 36

Resonite Version Number

Beta 2024.8.5.1341

What Platforms does this occur on?

Windows

What headset if any do you use?

Index & Desktop

Log Files

ANDREW-SUPERPC - 2024.8.5.1341 - 2024-08-29 10_55_12.log

Additional Context

No response

Reporters

AmasterAmaster

shiftyscales commented 1 month ago

Switching child slot references should make this Fire On Change node pulse when detecting a different parent.

Based on your report above- it sounds like it does work correctly though as long as all of the nodes remain connected? Why are you concerned with the use-case of it firing when the user attaches a new input to it directly while building it?

Using a multiplexer, or a store would be the expected ways I'd anticipate a user using these nodes if you need to have multiple input sources that it is detecting.

Does the node work as intended in the setup you provided if you move the slot between parents by manually reparenting it rather than changing what slot's parent is being read?

AmasterAmaster commented 1 month ago

it sounds like it does work correctly though as long as all of the nodes remain connected?

Yes @shiftyscales, as this issue is specifically talking about the connections and interaction between the nodes. And then it falls apart when trying to change the slot reference directly by connecting a new slot wire (and since it is a different slot under a different parent, I would expect it to register it and pulse accordingly).

Why are you concerned with the use-case of it firing when the user attaches a new input to it directly while building it?

Just for the reason of testing a group of nodes with different slots, and wanting to see what would happen as well as what results I would get from it. Since I discovered this oddity, I might as well report it, you know? A user would see that a parent has changed and be confused on why it would not fire when providing a different parent.

Does the node work as intended in the setup you provided if you move the slot between parents by manually reparenting it rather than changing what slot's parent is being read?

Yes, and I suspect it is because the parent field in the slot is changing and the Fire On Change node is registering that fine. While switching the slots instead by wire, there could be a gap of time preventing the node from firing, but as seen with the multiplex, that fixes it (only compounding the confusion when removing that node with the exact same setup, and still working as if the bug was not there).

It is a weird phenomenon.