Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
impl.hpp
Go to the documentation of this file.
1
6#pragma once
7
8namespace flecs {
9
10template <typename... Args>
11inline flecs::entity world::prefab(Args &&... args) const {
12 flecs::entity result = flecs::entity(world_, FLECS_FWD(args)...);
13 result.add(flecs::Prefab);
14 return result;
15}
16
17template <typename T>
18inline flecs::entity world::prefab(const char *name) const {
19 flecs::entity result = this->entity<T>(name);
20 result.add(flecs::Prefab);
21 return result;
22}
23
24}
flecs::entity prefab(const char *name=nullptr) const
Create a prefab that's associated with a type.
const Self & add() const
Add a component to an entity.
Definition builder.hpp:25
Entity.
Definition entity.hpp:30
world_t * world_
Pointer to the underlying C world.
Definition world.hpp:1423