bevy/examples/asset
Joona Aalto 25bfa80e60
Migrate cameras to required components (#15641)
# Objective

Yet another PR for migrating stuff to required components. This time,
cameras!

## Solution

As per the [selected
proposal](https://hackmd.io/tsYID4CGRiWxzsgawzxG_g#Combined-Proposal-1-Selected),
deprecate `Camera2dBundle` and `Camera3dBundle` in favor of `Camera2d`
and `Camera3d`.

Adding a `Camera` without `Camera2d` or `Camera3d` now logs a warning,
as suggested by Cart [on
Discord](https://discord.com/channels/691052431525675048/1264881140007702558/1291506402832945273).
I would personally like cameras to work a bit differently and be split
into a few more components, to avoid some footguns and confusing
semantics, but that is more controversial, and shouldn't block this core
migration.

## Testing

I ran a few 2D and 3D examples, and tried cameras with and without
render graphs.

---

## Migration Guide

`Camera2dBundle` and `Camera3dBundle` have been deprecated in favor of
`Camera2d` and `Camera3d`. Inserting them will now also insert the other
components required by them automatically.
2024-10-05 01:59:52 +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 Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
alter_sprite.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
asset_decompression.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
asset_loading.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
asset_settings.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +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 cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
embedded_asset.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
extra_source.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
hot_asset_reloading.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
multi_asset_sync.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00
repeated_texture.rs Migrate cameras to required components (#15641) 2024-10-05 01:59:52 +00:00