Function ecs_set_scope

Synopsis

#include <include/flecs.h>

FLECS_API ecs_entity_t ecs_set_scope(ecs_world_t *world, ecs_entity_t scope)

Description

Set the current scope. This operation sets the scope of the current stage to the provided entity. As a result new entities will be created in this scope, and lookups will be relative to the provided scope.

It is considered good practice to restore the scope to the old value.

Parameters

world - The world.

scope - The entity to use as scope.

Returns
The previous scope.

Mentioned in

Source

Line 2111 in include/flecs.h.