Sfoglia il codice sorgente

doc: more details on entt::null (close #375)

Michele Caini 6 anni fa
parent
commit
5b1bac4c19
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      docs/md/entity.md

+ 5 - 0
docs/md/entity.md

@@ -628,6 +628,11 @@ const auto entity = registry.create();
 const bool null = (entity == entt::null);
 const bool null = (entity == entt::null);
 ```
 ```
 
 
+Be aware that `entt::null` and entity 0 aren't the same thing. Likewise, a zero
+initialized entity isn't the same as `entt::null`. Therefore, although
+`entt::entity{}` is in some sense an alias for entity 0, none of them can be
+used to create a null entity.
+
 ### Stomp
 ### Stomp
 
 
 Using multiple registries at the same time is quite common. Examples are the
 Using multiple registries at the same time is quite common. Examples are the