Flecs: ecs_entity_desc_t Struct Reference
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.1 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
ecs_entity_desc_t Struct Reference
C API » Core » API types | C API » Core » Entities

Used with ecs_entity_init(). More...

`#include <flecs.h>`

## Public Attributes
int32_t | _canary
| Used for validity testing.
ecs_entity_t | id
| Set to modify existing entity (optional).
ecs_entity_t | parent
| Parent entity.
const char * | name
| Name of the entity.
const char * | sep
| Optional custom separator for hierarchical names.
const char * | root_sep
| Optional, used for identifiers relative to the root.
const char * | symbol
| Optional entity symbol.
bool | use_low_id
| When set to true, a low id (typically reserved for components) will be used to create the entity, if no ID is specified.
const ecs_id_t * | add
| 0-terminated array of IDs to add to the entity.
const ecs_value_t * | set
| 0-terminated array of values to set on the entity.
const char * | add_expr
| String expression with components to add.

## Detailed Description

Used with ecs_entity_init().

Definition at line 1042 of file flecs.h.

## Member Data Documentation

## ◆ _canary

int32_t ecs_entity_desc_t::_canary

Used for validity testing.

Must be 0.

Definition at line 1043 of file flecs.h.

## ◆ add

const ecs_id_t* ecs_entity_desc_t::add

0-terminated array of IDs to add to the entity.

Definition at line 1075 of file flecs.h.

## ◆ add_expr

const char* ecs_entity_desc_t::add_expr

String expression with components to add.

Definition at line 1081 of file flecs.h.

## ◆ id

ecs_entity_t ecs_entity_desc_t::id

Set to modify existing entity (optional).

Definition at line 1045 of file flecs.h.

## ◆ name

const char* ecs_entity_desc_t::name

Name of the entity.

If no entity is provided, an entity with this name will be looked up first. When an entity is provided, the name will be verified with the existing entity.

Definition at line 1049 of file flecs.h.

## ◆ parent

ecs_entity_t ecs_entity_desc_t::parent

Parent entity.

Definition at line 1047 of file flecs.h.

## ◆ root_sep

const char* ecs_entity_desc_t::root_sep

Optional, used for identifiers relative to the root.

Definition at line 1058 of file flecs.h.

## ◆ sep

const char* ecs_entity_desc_t::sep

Optional custom separator for hierarchical names.

Leave to NULL for the default ('.') separator. Set to an empty string to prevent tokenization of the name.

Definition at line 1054 of file flecs.h.

## ◆ set

const ecs_value_t* ecs_entity_desc_t::set

0-terminated array of values to set on the entity.

Definition at line 1078 of file flecs.h.

## ◆ symbol

const char* ecs_entity_desc_t::symbol

Optional entity symbol.

A symbol is an unscoped identifier that can be used to look up an entity. The primary use case for this is to associate the entity with a language identifier, such as a type or function name, where these identifiers differ from the name they are registered with in Flecs. For example, C type "EcsPosition" might be registered as "flecs.components.transform.Position", with the symbol set to "EcsPosition".

Definition at line 1060 of file flecs.h.

## ◆ use_low_id

bool ecs_entity_desc_t::use_low_id

When set to true, a low id (typically reserved for components) will be used to create the entity, if no ID is specified.

Definition at line 1070 of file flecs.h.

The documentation for this struct was generated from the following file:

- include/flecs.h