Skip to content

Instantly share code, notes, and snippets.

View nwtnni's full-sized avatar

Newton Ni nwtnni

View GitHub Profile
@nwtnni
nwtnni / cloneEntity.rs
Last active April 23, 2024 14:11 — forked from GianpaoloBranca/cloneEntity.rs
Copy all components from an Entity to another in Bevy
//! Bevy Version: 0.10
//! Original: https://gist.github.com/GianpaoloBranca/17e5bd6ada9bdb04cca58182db8505d4
//! See also: https://github.com/bevyengine/bevy/issues/1515
use bevy::ecs::system::Command;
use bevy::prelude::*;
pub struct CloneEntity {
pub source: Entity,
pub destination: Entity,