bevy/examples/3d
Martin Dickopp 6114347bc4
Fix confusing comment in pbr example (#16996)
# Objective

After a recent fix for a panic in the pbr example (#16976), the code
contains the following comment:

```rust
// This system relies on system parameters that are not available at start
// Ignore parameter failures so that it will run when possible
.add_systems(Update, environment_map_load_finish.never_param_warn())
```

However, this explanation is incorrect. `EnvironmentMapLabel` is
available at start. The real issue is that it is no longer available
once it has been removed by `environment_map_load_finish`.

## Solution

- Remove confusing/incorrect comment and `never_param_warn()`.
- Make `Single<Entity, With<EnvironmentMapLabel>>` optional in
`environment_map_load_finish`, and check that the entity has not yet
been despawned.

Since it is expected that an entity is no longer there once it has been
despawned, it seems better to me to handle this case in
`environment_map_load_finish`.

## Testing

Ran `cargo run --example pbr`.
2024-12-29 22:45:17 +00:00
..
3d_scene.rs
3d_shapes.rs
3d_viewport_to_world.rs
animated_material.rs
anisotropy.rs
anti_aliasing.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
atmospheric_fog.rs
auto_exposure.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
blend_modes.rs Fix example build for wasm (#16557) 2024-11-30 00:02:04 +00:00
bloom_3d.rs
camera_sub_view.rs
clearcoat.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
color_grading.rs
deferred_rendering.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
depth_of_field.rs
fog_volumes.rs
fog.rs
generate_custom_mesh.rs
irradiance_volumes.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
lighting.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
lightmaps.rs Get lightmaps working in deferred rendering. (#16836) 2024-12-26 22:13:05 +00:00
lines.rs
load_gltf_extras.rs
load_gltf.rs
mesh_ray_cast.rs Rename RayCastSettings to MeshRayCastSettings (#16703) 2024-12-10 03:27:42 +00:00
meshlet.rs Meshlet normal-aware LOD and meshoptimizer upgrade (#16111) 2024-11-04 15:20:22 +00:00
mixed_lighting.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
motion_blur.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
order_independent_transparency.rs ✏️ Fix typos across bevy (#16702) 2024-12-08 01:18:39 +00:00
orthographic.rs
parallax_mapping.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
parenting.rs
pbr.rs Fix confusing comment in pbr example (#16996) 2024-12-29 22:45:17 +00:00
pcss.rs
post_processing.rs
query_gltf_primitives.rs
reflection_probes.rs
render_to_texture.rs
rotate_environment_map.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
scrolling_fog.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
shadow_biases.rs
shadow_caster_receiver.rs
skybox.rs Introduce support for mixed lighting by allowing lights to opt out of contributing diffuse light to lightmapped objects. (#16761) 2024-12-16 23:48:33 +00:00
spherical_area_lights.rs
split_screen.rs
spotlight.rs
ssao.rs
ssr.rs Don't reëxport bevy_image from bevy_render (#16163) 2024-11-10 06:54:38 +00:00
texture.rs
tonemapping.rs Update hashbrown to 0.15 (#15801) 2024-12-10 19:45:50 +00:00
transmission.rs
transparency_3d.rs
two_passes.rs
update_gltf_scene.rs
vertex_colors.rs
visibility_range.rs Make visibility range (HLOD) dithering work when prepasses are enabled. (#16286) 2024-12-04 17:34:36 +00:00
volumetric_fog.rs
wireframe.rs