Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run conditions only work when adding ActionState as resource #627

Open
teohhanhui opened this issue Sep 15, 2024 · 1 comment
Open

Run conditions only work when adding ActionState as resource #627

teohhanhui opened this issue Sep 15, 2024 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@teohhanhui
Copy link

Version

cd50ba1

Operating system & version

N/A

What you did

  1. Follow Getting Started.
  2. Try to use e.g. leafwing_input_manager::common_conditions::action_toggle_active in run_if.

What you expected to happen

The run_if condition should work.

What actually happened

Observed a panic such as:

ERROR app: panicked at /home/teohhanhui/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bevy_ecs-0.14.2/src/system/system_param.rs:534:17:
Resource requested by leafwing_input_manager::common_conditions::action_toggle_active<hexciv::Action>::{{closure}} does not exist: leafwing_input_manager::action_state::ActionState<hexciv::Action>

Additional information

It works if I switch to using a pattern like https://github.com/Leafwing-Studios/leafwing-input-manager/blob/cd50ba147978dfbc4e824fa0aa9695996b2caf13/examples/action_state_resource.rs

@teohhanhui teohhanhui added the bug Something isn't working label Sep 15, 2024
@alice-i-cecile alice-i-cecile added the good first issue Good for newcomers label Sep 15, 2024
@alice-i-cecile
Copy link
Contributor

Thanks for the report. I agree that this is a bug, and would welcome a PR to fix this.

@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants