Archive 17/01/2023.

LuaScript’s Start function

setzer22

When is exactly the Start function for Lua ScriptObjects called?

I’ve tried checking LuaScriptInstance.cpp/.h and I find it strange because LSOM_START is only declared and never used, unlike the others. So I can’t really find where and when is the Start method called.

Thanks!

cadaver

There’s Lua code in LuaScriptInstance.pkg which handles the object creation and also calls Start().

setzer22

Oh, so it’s done when the lua binding functions are called, that makes sense.

Thank you! :smiley: