From d7891fabc06a2010ef2c8580eb765e5d85bcab0d Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Fri, 12 May 2023 08:23:08 +0200 Subject: [PATCH] doc: mention named pools support when registering listeners --- docs/md/entity.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/md/entity.md b/docs/md/entity.md index ace9edca9..35409b672 100644 --- a/docs/md/entity.md +++ b/docs/md/entity.md @@ -366,7 +366,15 @@ the destruction and update of an instance, respectively.
Because of how C++ works, listeners attached to `on_update` are only invoked following a call to `replace`, `emplace_or_replace` or `patch`. -The function type of a listener is equivalent to the following: +Runtime pools are also supported by providing an identifier to the functions +above: + +```cpp +registry.on_construct("other"_hs).connect<&my_free_function>(); +``` + +Refer to the following sections for more information about runtime pools.
+In all cases, the function type of a listener is equivalent to the following: ```cpp void(entt::registry &, entt::entity);