Skip to content

Commit

Permalink
#1033 Fix ecs_w_new_pair in Manual.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pfeodrippe committed Aug 27, 2023
1 parent 8854835 commit 1bfbe71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ ECS_PREFAB(world, prefab, Position, Velocity);
To instantiate a prefab, an application can use the `IsA` relationship:

```c
ecs_entity_t e = ecs_new_w_pair(world, (IsA, prefab));
ecs_entity_t e = ecs_new_w_pair(world, IsA, prefab);
```

To ensure that entities that inherit from a prefab don't also inherit the `Prefab` tag (which would cause them to not get matched with systems), the `Prefab` tag does not propagate to derived entities. This is illustrated in the following example:
Expand All @@ -1201,7 +1201,7 @@ ECS_PREFAB(world, prefab, Position);
ecs_has(world, prefab, EcsPrefab); // true
ecs_has(world, prefab, Position); // true

ecs_entity_t e = ecs_new_w_pair(world, (IsA, prefab));
ecs_entity_t e = ecs_new_w_pair(world, IsA, prefab);
ecs_has(world, e, EcsPrefab); // false
ecs_has(world, e, Position); // true
```
Expand Down

0 comments on commit 1bfbe71

Please sign in to comment.