Skip to content

Conversation

@Leinnan
Copy link
Contributor

@Leinnan Leinnan commented Feb 26, 2025

Objective

BRP has no way to interact with Resources, this is a first step to change that.

Solution

  • Add methods to:
    • list resources
    • get content of the resource
    • mutate a resource

Testing

Tested the commands by running the BRP sample( cargo run --example server --features="bevy_remote") and with these curl commands:

curl -X POST -d '{ "jsonrpc": "2.0", "id": 1, "method": "bevy/resources/list"}' 127.0.0.1:15702 | jq .
curl -X POST -d '{ "jsonrpc": "2.0", "id": 1, "method": "bevy/resources/get", "params": "bevy_picking::PickingPlugin" }' 127.0.0.1:15702 | jq .
curl -X POST -d '{ "jsonrpc": "2.0", "id": 1, "method": "bevy/resources/mutate", "params": {"resource": "bevy_picking::PickingPlugin", "path":"is_enabled", "value": false} }' 127.0.0.1:15702 | jq .

@Leinnan
Copy link
Contributor Author

Leinnan commented Feb 26, 2025

Close since there is already one #17423 accepted and ready to merge

@Leinnan Leinnan closed this Feb 26, 2025
@Leinnan Leinnan deleted the brp_resources_commands branch April 25, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant