I tested the Map hook but it works partially.
In the attached image you can see my hook which prints the name of each object sent to the hook by Map::Load. The only entity seems to be the light. The two boxes in the scene never shows up in the hook.
Any suggestions ?
According to the docs EVERY entity loaded will reach the hook
Map::Load
This function loads a Leadwerks map (*.map) file.
Syntax
static bool Load(const std::string& path, int flags=LoadScripts, const uint64_t fileid=0)
static bool Load(const std::string& path, void hook(Entity* entity, Object* extra), Object* extra=NULL, const int flags=LoadScripts, const uint64_t fileid=0);
Parameters
path: the file path to load the scene from.
hook: pointer to a function that will be called for each loaded entity in the scene.
hookname: script function name that will be called for each loaded entity in the scene.