bevy/examples/asset
Tim 3da0ef048e
Remove the Component trait implementation from Handle (#15796)
# Objective

- Closes #15716
- Closes #15718

## Solution

- Replace `Handle<MeshletMesh>` with a new `MeshletMesh3d` component
- As expected there were some random things that needed fixing:
- A couple tests were storing handles just to prevent them from being
dropped I believe, which seems to have been unnecessary in some.
- The `SpriteBundle` still had a `Handle<Image>` field. I've removed
this.
- Tests in `bevy_sprite` incorrectly added a `Handle<Image>` field
outside of the `Sprite` component.
- A few examples were still inserting `Handle`s, switched those to their
corresponding wrappers.
- 2 examples that were still querying for `Handle<Image>` were changed
to query `Sprite`

## Testing

- I've verified that the changed example work now

## Migration Guide

`Handle` can no longer be used as a `Component`. All existing Bevy types
using this pattern have been wrapped in their own semantically
meaningful type. You should do the same for any custom `Handle`
components your project needs.

The `Handle<MeshletMesh>` component is now `MeshletMesh3d`.

The `WithMeshletMesh` type alias has been removed. Use
`With<MeshletMesh3d>` instead.
2024-10-09 21:10:01 +00:00
..
files Add example for using .meta files (#12882) 2024-04-08 17:10:56 +00:00
processing bevy_asset: Improve NestedLoader API (#15509) 2024-10-01 14:14:04 +00:00
alter_mesh.rs Text rework (#15591) 2024-10-09 18:35:36 +00:00
alter_sprite.rs Remove the Component trait implementation from Handle (#15796) 2024-10-09 21:10:01 +00:00
asset_decompression.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
asset_loading.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
asset_settings.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
custom_asset.rs Cleanup unneeded lifetimes in bevy_asset (#15546) 2024-09-30 21:54:59 +00:00
custom_asset_reader.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
embedded_asset.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
extra_source.rs Migrate bevy_sprite to required components (#15489) 2024-10-09 16:17:26 +00:00
hot_asset_reloading.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
multi_asset_sync.rs Rename TextBlock to TextLayout (#15797) 2024-10-09 20:58:27 +00:00
repeated_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00