MCPcopy Create free account
hub / github.com/defold/defold / CompScriptFinal

Function CompScriptFinal

engine/gameobject/src/gameobject/comp_script.cpp:193–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191 }
192
193 CreateResult CompScriptFinal(const ComponentFinalParams& params)
194 {
195 HScriptInstance script_instance = (HScriptInstance)*params.m_UserData;
196
197 lua_State* L = GetLuaState(params.m_Context);
198 int top = lua_gettop(L);
199 (void)top;
200 ScriptResult ret = RunScript(L, script_instance->m_Script, SCRIPT_FUNCTION_FINAL, script_instance, RunScriptParams());
201 assert(top == lua_gettop(L));
202 if (ret == SCRIPT_RESULT_FAILED)
203 {
204 return CREATE_RESULT_UNKNOWN_ERROR;
205 }
206 else
207 {
208 return CREATE_RESULT_OK;
209 }
210 }
211
212 CreateResult CompScriptAddToUpdate(const ComponentAddToUpdateParams& params)
213 {

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.85
RunScriptParamsClass · 0.85
GetLuaStateFunction · 0.70
RunScriptFunction · 0.70
assertFunction · 0.50

Tested by

no test coverage detected