Skip to content
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

Camera serialization fails due to unregistered types. #11036

Closed
kidrigger opened this issue Dec 20, 2023 · 0 comments · Fixed by #11069
Closed

Camera serialization fails due to unregistered types. #11036

kidrigger opened this issue Dec 20, 2023 · 0 comments · Fixed by #11069
Labels
A-Reflection Runtime information about types A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy
Milestone

Comments

@kidrigger
Copy link
Contributor

Bevy version

0.12.1

What you did

  1. Use the scene serialization example.
  2. Add a default Camera3dBundle to a scene before serialization.
  3. Run program without input file.
  4. Rename generated load_scene_example-new.scn.ron to load_scene_example.scn.ron to use as input.
  5. Re-run program to use the file as input.
  6. Error

What went wrong

Deserialization fails with:

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: 100:31: no registration found for type bevy_core_pipeline::core_3d::camera_3d::Camera3dDepthTextureUsage

Relevant Serialized RON

 "bevy_core_pipeline::core_3d::camera_3d::Camera3d": (
          clear_color: Default,
          depth_load_op: Clear(0.0),
          depth_texture_usages: (16),
          screen_space_specular_transmission_steps: 1,
          screen_space_specular_transmission_quality: Medium,
        ),

If it's not clear, break this out into:

  • What were you expecting?
    Serialized file can be deserialized.
  • What actually happened?
    Types used by Camera3D are not registered and cannot be loaded.
    Note:

Additional information

Changes to the example:

Add to line 118 in the scene sample

scene_world.spawn((Camera3dBundle::default(), Name::from("TestThis")));
@kidrigger kidrigger added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Dec 20, 2023
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen A-Reflection Runtime information about types D-Trivial Nice and easy! A great choice to get started with Bevy and removed S-Needs-Triage This issue needs to be labelled labels Dec 21, 2023
@alice-i-cecile alice-i-cecile added this to the 0.13 milestone Dec 21, 2023
kidrigger added a commit to kidrigger/bevy that referenced this issue Dec 22, 2023
Register and Serialize `Camera3dDepthTextureUsage` and
`ScreenSpaceTransmissionQuality`.

Fixes: bevyengine#11036
github-merge-queue bot pushed a commit that referenced this issue Dec 23, 2023
# Objective

Register and Serialize `Camera3dDepthTextureUsage` and
`ScreenSpaceTransmissionQuality`.

Fixes: #11036

## Solution

Added the relevant derives for reflection and serialization and type
registrations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Reflection Runtime information about types A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants