Add profiling scope for call to OnInit

This commit is contained in:
meehl committed 2026-08-27 16:34:40 +02:00
1 parent 4e67aa72c0
commit 692e530867
1 file changed
+4 -1
+4 -1
View File
@@ -147,7 +147,10 @@ impl PathOfBuilding {
fn launch(lua: &Lua, script_dir: &Path) -> LuaResult<()> {
change_working_directory(script_dir)?;
lua.load(script_dir.join("Launch.lua")).exec()?;
call_callback::<(), ()>(lua, "OnInit", ())?;
{
profiling::scope!("OnInit");
call_callback::<(), ()>(lua, "OnInit", ())?;
}
Ok(())
}