-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Deprecate SpatialBundle #15830
Deprecate SpatialBundle #15830
Conversation
Can you check the issues for these? I think the former is not yet reported. |
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.
Shouldn't Visibility::default()
be added on these removals too?
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.
The bounding example actually doesn't use visibility at all (nor GlobalTransform
), I created this example but I'm not sure why I used SpatialBundle
instead of just Transform
.
.insert(FogVolume { | ||
commands.spawn(( | ||
Transform::from_xyz(0.0, 0.5, 0.0), | ||
FogVolume { |
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.
This should also have Visibility::Visible
right? I assume FogVolume
would be requiring Visibility::default()
if not. It might not matter though...
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.
Same as above, in this case FogVolume
requires Visibility
which means it defaults to Inherited
, and functions as visible.
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.
Thanks for addressing my comments!
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 to me! @mnmaita 's comments look like they were all covered, and the other examples had the necessary required components. I didn't see any other uses of SpatialBundle
throughout the code base either, so I'm happy to approve given alice-i-cecile 's comments are covered too!
Objective
SpatialBundle
is yet to be deprecatedSolution
SpatialBundle
Transform
andVisibility
instead in examples using itspawn
orinsert
inserting a defaultTransform
orVisibility
with component already requiring either, remove those components from the tupleTesting
Yes, I ran the examples I changed and tests
The
gamepad_viewer
and andcustom_shader_instancing
examples don't work as intended due to entirely unrelated code, didn't check main.Run examples, or just check that all spawned values are identical
Linux, wayland trough x11 (cause that's the default feature)
Migration Guide
SpatialBundle
is now deprecated, insertTransform
andVisibility
instead which will automatically insert all other components that were in the bundle. If you do not specify these values and any other components in yourspawn
/insert
call already requires either of these components you can leave that one out.before:
after: