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
8
namespace
flecs {
9
10
template
<
typename
... Args>
11
inline
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
17
template
<
typename
T>
18
inline
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::world::prefab
flecs::entity prefab(const char *name=nullptr) const
Create a prefab that's associated with a type.
flecs::entity_builder::add
const Self & add() const
Add a component to an entity.
Definition
builder.hpp:25
flecs::entity
Entity.
Definition
entity.hpp:30
flecs::world::world_
world_t * world_
Pointer to the underlying C world.
Definition
world.hpp:1423