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

[Merged by Bors] - can clone a scene #5855

Closed
wants to merge 7 commits into from

Conversation

mockersf
Copy link
Member

@mockersf mockersf commented Sep 1, 2022

Objective

  • Easier to work with model assets
  • Models are often one mesh, many textures. This can be hard to use in Bevy as it's not possible to clone the scene to have one scene for each material. It's still possible to instantiate the texture-less scene, then modify the texture material once spawned but that means happening during play and is quite more painful

Solution

  • Expose the code to clone a scene. This code already existed but was only possible to use to spawn the scene

@mockersf mockersf added C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Scenes Serialized ECS data stored on the disk labels Sep 1, 2022
Copy link
Contributor

@djeedai djeedai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks useful but I'm not sure I understand the design of the new methods introduced. I may be missing some details of ECS here?

crates/bevy_scene/src/scene.rs Outdated Show resolved Hide resolved
crates/bevy_scene/src/scene.rs Outdated Show resolved Hide resolved
crates/bevy_scene/src/scene.rs Outdated Show resolved Hide resolved
crates/bevy_scene/src/scene.rs Outdated Show resolved Hide resolved
crates/bevy_scene/src/scene.rs Outdated Show resolved Hide resolved
crates/bevy_scene/src/scene_spawner.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@djeedai djeedai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Sep 2, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Sep 2, 2022
# Objective

- Easier to work with model assets
- Models are often one mesh, many textures. This can be hard to use in Bevy as it's not possible to clone the scene to have one scene for each material. It's still possible to instantiate the texture-less scene, then modify the texture material once spawned but that means happening during play and is quite more painful

## Solution

- Expose the code to clone a scene. This code already existed but was only possible to use to spawn the scene
@bors bors bot changed the title can clone a scene [Merged by Bors] - can clone a scene Sep 2, 2022
@bors bors bot closed this Sep 2, 2022
james7132 pushed a commit to james7132/bevy that referenced this pull request Oct 28, 2022
# Objective

- Easier to work with model assets
- Models are often one mesh, many textures. This can be hard to use in Bevy as it's not possible to clone the scene to have one scene for each material. It's still possible to instantiate the texture-less scene, then modify the texture material once spawned but that means happening during play and is quite more painful

## Solution

- Expose the code to clone a scene. This code already existed but was only possible to use to spawn the scene
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Objective

- Easier to work with model assets
- Models are often one mesh, many textures. This can be hard to use in Bevy as it's not possible to clone the scene to have one scene for each material. It's still possible to instantiate the texture-less scene, then modify the texture material once spawned but that means happening during play and is quite more painful

## Solution

- Expose the code to clone a scene. This code already existed but was only possible to use to spawn the scene
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Scenes Serialized ECS data stored on the disk C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants