Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Renzora Engine `r1-alpha8`

## 2026-10-07 21:03
- fix(hierarchy): Duplicate in the hierarchy right-click menu copies every component, like Ctrl+D, instead of making an empty entity at the origin

## 2026-09-18 16:27
- fix(game-ui): an `expand` canvas previewed over the viewport lays out like the shipped game, so edge-anchored UI reaches the edge
- fix(game-ui): a canvas root no longer keeps a preview scale that was saved into a scene, which shrank the UI in an exported game
Expand Down
17 changes: 11 additions & 6 deletions crates/renzora_hierarchy/src/native/context_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,16 +316,21 @@ fn add_child(world: &mut World, target: Entity) {
}
}

/// Deep-clones `target` through Bevy's `clone_and_spawn`, the same path the
/// Ctrl+D shortcut uses (`renzora_gizmo::shortcuts::duplicate_entities`), so
/// the menu and keyboard produce the same object. This used to spawn only a
/// `Name` and a default `Transform`: the "copy" had no mesh, collider or
/// gameplay components and sat at the origin.
fn duplicate(world: &mut World, target: Entity) {
let parent = world.get::<ChildOf>(target).map(|c| c.parent());
let Ok(mut src) = world.get_entity_mut(target) else {
return;
};
let new_entity = src.clone_and_spawn();
let name = world
.get::<Name>(target)
.get::<Name>(new_entity)
.map(|n| format!("{} (Copy)", n.as_str()))
.unwrap_or_else(|| "Entity (Copy)".to_string());
let new_entity = world.spawn((Name::new(name), Transform::default())).id();
if let Some(p) = parent {
world.entity_mut(new_entity).set_parent_in_place(p);
}
world.entity_mut(new_entity).insert(Name::new(name));
if let Some(sel) = world.get_resource::<EditorSelection>() {
sel.set(Some(new_entity));
}
Expand Down