virtual_joystick icon indicating copy to clipboard operation
virtual_joystick copied to clipboard

README Example Code Doesn't Compile

Open JimLynchCodes opened this issue 1 year ago • 1 comments

Describe the bug Example code is double wrong I think...

To Reproduce Steps to reproduce the behavior:

  1. Create any Bevy project on bevy 0.14
  2. cargo add virtual_joystick
  3. Add the line from README:
.add_plugin(VirtualJoystickPlugin::<JoystickControllerID>::default())

This gives 1 error that "add_plugin" is not a valid function. Is that just a typo? I don't think the singular add_plugin has been a thing since version 0.10 (according to chatgpt 😅)

Screenshot 2024-10-03 at 11 27 33 AM

When I change it to ".add_plugins" I then see another error for the argument to this function:

Screenshot 2024-10-03 at 11 27 23 AM

Can we please update it to some code that works?

Or am I doing it wrong?

Thanks 👍

JimLynchCodes avatar Oct 03 '24 15:10 JimLynchCodes

Oooo, you are absolutely right, I will review this in detail, I should take the example out of the examples folder, for now I recommend you take those, thank you very much for the report

SergioRibera avatar Oct 03 '24 21:10 SergioRibera

Solved on v2.5.1 (https://github.com/SergioRibera/virtual_joystick/commit/ed8f20a3e93bd99e84669f66652ca8690fb9ce5e)

Sorry for delay 😅

SergioRibera avatar Oct 18 '25 08:10 SergioRibera