-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Renamed BRP methods to be more explicit. #19377
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
base: main
Are you sure you want to change the base?
Conversation
I wonder if the prefix shouldn't be Here are some observations:
There are conflicting "standards" but which one should we have (among many other variations)?
My personal favorite would be |
Another random thought: should there be an |
I would agree with dropping the
I did consider adding an As for general naming convention, I have no strong feelings either way. |
To me this indicates that the names should follow the So In the end the question is what will future methods be? For instance I read somewhere that future resources will be changed to become actual components. Will we always be able to fit in a category without ambiguity like
No strong feelings either. Just dropping thoughts before it's "too late". |
@splo For me it looks fine, but I don't have strong opinion here. |
If noone has strong opinion, then I'd suggest moving on with dropping the
Your choice @AlephCubed! |
Also renamed associated types and functions.
Fixed #18055.
Based on the discussion in the related issue, the following BRP methods have been renamed:
bevy/query
world.query
bevy/spawn
world.spawn_entity
bevy/destroy
world.despawn_entity
bevy/reparent
world.reparent_entity
bevy/get
world.get_components
bevy/insert
world.insert_components
bevy/remove
world.remove_components
bevy/list
world.list_components
bevy/mutate
world.mutate_components
bevy/get+watch
world.get_components+watch
bevy/list+watch
world.list_components+watch
bevy/get_resource
world.get_resources
bevy/insert_resource
world.insert_resources
bevy/remove_resource
world.remove_resources
bevy/list_resources
world.list_resources
bevy/mutate_resource
world.mutate_resources
registry/schema
registry.schema
I also replaced the word
destroy
withdespawn
to matchEntityCommands::despawn
and other related methods.