Function clone

Synopsis

#include <include/flecs/addons/cpp/entity_view.hpp>

flecs::entity clone(bool clone_value=true, flecs::entity_t dst_id=0) const

Description

No description yet.

Source

Lines 172-180 in include/flecs/addons/cpp/mixins/entity/impl.hpp. Line 602 in include/flecs/addons/cpp/entity_view.hpp.

inline flecs::entity entity_view::clone(bool copy_value, flecs::entity_t dst_id) const {
    if (!dst_id) {
        dst_id = ecs_new_id(m_world);
    }

    flecs::entity dst = flecs::entity(m_world, dst_id);
    ecs_clone(m_world, dst_id, m_id, copy_value);
    return dst;
}