Flecs v3.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Plecs

Data definition format for loading entity data. More...

Functions

FLECS_API int ecs_plecs_from_str (ecs_world_t *world, const char *name, const char *str)
 Parse plecs string.
 
FLECS_API int ecs_plecs_from_file (ecs_world_t *world, const char *filename)
 Parse plecs file.
 

Detailed Description

Data definition format for loading entity data.

Macro Definition Documentation

◆ FLECS_PLECS_H

#define FLECS_PLECS_H

Definition at line 50 of file plecs.h.

Function Documentation

◆ ecs_plecs_from_file()

FLECS_API int ecs_plecs_from_file ( ecs_world_t world,
const char *  filename 
)

Parse plecs file.

This parses a plecs file and instantiates the entities in the world. This operation is equivalent to loading the file contents and passing it to ecs_plecs_from_str.

Parameters
worldThe world.
filenameThe plecs file name.
Returns
Zero if success, non-zero otherwise.

◆ ecs_plecs_from_str()

FLECS_API int ecs_plecs_from_str ( ecs_world_t world,
const char *  name,
const char *  str 
)

Parse plecs string.

This parses a plecs string and instantiates the entities in the world.

Parameters
worldThe world.
nameThe script name (typically the file).
strThe plecs string.
Returns
Zero if success, non-zero otherwise.