-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Move Name
out of bevy_core
#16894
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
Move Name
out of bevy_core
#16894
Conversation
This will be one of the first "blessed" components, so it's not a fully uncontroversial decision. I think this is the right choice though, since my understanding is that this will be needed for the BSN macro. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Left a few comments
@@ -53,7 +53,7 @@ impl<T> Default for ReportHierarchyIssue<T> { | |||
/// (See B0004 explanation linked in warning message) | |||
pub fn check_hierarchy_component_has_valid_parent<T: Component>( | |||
parent_query: Query< | |||
(Entity, &Parent, Option<&bevy_core::Name>), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary for this PR, but we could replace the Option<&Name>
+ Entity
with NameOrEntity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I agree, I'll leave it off just to keep things less controversial, but it'd be a nice little follow-up.
Co-Authored-By: Christian Hughes <[email protected]>
# Objective - Contributes to bevyengine#16892 ## Solution - Moved `Name` and `NameOrEntity` into `bevy_ecs::name`, and added them to the prelude. ## Testing - CI ## Migration Guide If you were importing `Name` or `NameOrEntity` from `bevy_core`, instead import from `bevy_ecs::name`. --------- Co-authored-by: Christian Hughes <[email protected]>
# Objective - Contributes to bevyengine#16892 ## Solution - Moved `Name` and `NameOrEntity` into `bevy_ecs::name`, and added them to the prelude. ## Testing - CI ## Migration Guide If you were importing `Name` or `NameOrEntity` from `bevy_core`, instead import from `bevy_ecs::name`. --------- Co-authored-by: Christian Hughes <[email protected]>
# Objective After #16894, this example started logging errors: ``` ERROR bevy_asset::server: Failed to load asset 'scenes/load_scene_example.scn.ron' with asset loader 'bevy_scene::scene_loader::SceneLoader': Could not parse RON: 10:33: Expected string ``` Fixes #17798, this is the only actionable/unreported issue in there as far as I can tell. ## Solution Update the serialized scene with the expected format for `Name` ## Testing `cargo run --example scene` ## Discussion This example breaks very often and we don't always catch it. It might be nice to have this scene either 1. produce visual output so that it can be checked 2. panic if the scene fails to load (check for LoadState::Failed) Either of those would make the failures visible in [the example report](https://thebevyflock.github.io/bevy-example-runner/). Not sure which method would best suit the example.
Objective
bevy_core
#16892Solution
Name
andNameOrEntity
intobevy_ecs::name
, and added them to the prelude.Testing
Migration Guide
If you were importing
Name
orNameOrEntity
frombevy_core
, instead import frombevy_ecs::name
.