Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
EntityCloner Namespace Reference

Utilities for cloning/duplicating ECS entities and their associated components. More...

Functions

Entity clone (Registry &registry, VulkanRenderer &renderer, Entity source)
 Creates a duplicate of an existing entity, copying its components.

Detailed Description

Utilities for cloning/duplicating ECS entities and their associated components.

Utility functions for duplicating entities and their components.

Function Documentation

◆ clone()

Entity EntityCloner::clone ( Registry & registry,
VulkanRenderer & renderer,
Entity source )

Creates a duplicate of an existing entity, copying its components.

Clones a source entity and offsets its position slightly.

Parameters
registryReference to the ECS Registry.
rendererReference to the Vulkan Renderer.
sourceThe source entity to clone.
Returns
The newly spawned clone entity.
Parameters
registryECS registry reference.
rendererVulkan renderer.
sourceThe target entity to clone.
Returns
Offset clone entity.