Function remove_if_exists

Synopsis

#include <src/entt/entity/handle.hpp>

template <typename... Component>
decltype(auto) remove_if_exists() const

Description

Removes the given components from a handle.

See
basic_registry::remove_if_exists
Template Parameters

Component - Types of components to remove.

Return
The number of components actually removed.

Source

Lines 189-193 in src/entt/entity/handle.hpp.

template<typename... Component>
decltype(auto) remove_if_exists() const {
    static_assert(sizeof...(Type) == 0 || (type_list_contains_v<type_list<Type...>, Component> && ...));
    return reg->template remove_if_exists<Component...>(entt);
}





Add Discussion

Log in to comment