18 ecs_err(
"id is not a type");
23 ecs_assert(ptr != NULL, ECS_INTERNAL_ERROR, NULL);
41 return set_json(ecs_pair(r, t), json, desc);
62template <
typename R,
typename T>
FLECS_API const char * ecs_ptr_from_json(const ecs_world_t *world, ecs_entity_t type, void *ptr, const char *json, const ecs_from_json_desc_t *desc)
Parse JSON string into value.
#define ecs_assert(condition, error_code,...)
Assert.
const Self & set_json_second(flecs::entity_t r, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
const Self & set_json(flecs::entity_t r, flecs::entity_t t, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
const Self & set_json(flecs::id_t e, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set component from JSON.
const Self & set_json(const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
const Self & set_json(const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set component from JSON.
const Self & set_json(flecs::entity_t t, const char *json, flecs::from_json_desc_t *desc=nullptr) const
Set pair from JSON.
void * ecs_ensure_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Get a mutable pointer to a component.
void ecs_modified_id(ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Signal that a component has been modified.
ecs_entity_t ecs_get_typeid(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
Used with ecs_ptr_from_json(), ecs_entity_from_json().