Yellow-Dog-Man / Resonite-Issues

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

ToolEvents Dequipped Event Not Triggering with BrushTools #723

Open blhsrwznrghfzpr opened 10 months ago

blhsrwznrghfzpr commented 10 months ago

Describe the bug?

The Dequipped event in ToolEvents does not trigger with the BrushTool. This issue persists across multiple brush tools, including the BillboardBrushTool, BoxBrushTool, ConvexHullBrushTool, GeometryLineBrushTool, and QuadBrushTool, as none of them function properly.

To Reproduce

  1. Create a new Empty Object.
  2. Attach the GeometryLineBrushTool component to generate the BrushTool.
  3. Extract the ToolEvents node and create a Display node from the Dequipped event.
  4. Set the GeometryLineBrushTool in ToolEvents.
  5. Equip and then unequip the GeometryLineBrushTool.

Expected behavior

The Dequipped Call is expected to be triggered from the ToolEvents node.

Screenshots

image

Resonite Version Number

Beta 2023.11.15.1158

What Platforms does this occur on?

Windows

What headset if any do you use?

Desktop

Log Files

DESKTOP-J7OQFUR - 2023.11.15.1158 - 2023-11-17 19_48_25.log

Additional Context

No response

Reporters

Resonite: yoshi1123 Discord: yoshi1123

shiftyscales commented 7 months ago

Can you please provide a full list of tools this bug happens with @blhsrwznrghfzpr? Is it only the brush tools you've listed? Or are those the only ones you've tried that it happens with?

Please also provide a replication object or world that has the setup you described pre-configured so it doesn't need to be built every time.

blhsrwznrghfzpr commented 7 months ago

I checked all the tooltips in the /Tools. The only ones that did not work were those in the /Tools/Brushes. (Beta 2024.1.24.840)

The replication object I investigated is as follows:

resrec:///U-yoshi1123-/R-66815908-8014-46f8-a2f8-67943cfc2738

Here is the complete list of tools I checked:

Did not work

Worked

Banane9 commented 7 months ago

I took a quick peek at it, and it would seem that the OnDequipped override on the BrushTool base class for all those specific brushes is missing a call to base.OnDequipped(), which handles the notification of IToolEventReceiver components on the tool's slot and of the LocalDequipped event which the Tool Events node subscribes to.

The OnEquipped method does have this call to its base method.

shiftyscales commented 7 months ago

Thanks for the additional information and context. That helps. @blhsrwznrghfzpr @Banane9.

shiftyscales commented 7 months ago

This issue seems to have everything it needs, @Frooxius @ProbablePrime.

ProbablePrime commented 7 months ago

Will look