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

Function GetScript

engine/gameobject/src/gameobject/gameobject_script.cpp:182–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 }
181
182 static Script* GetScript(lua_State *L)
183 {
184 int top = lua_gettop(L);
185 (void)top;
186 dmScript::GetInstance(L);
187 Script* script = (Script*)dmScript::ToUserType(L, -1, SCRIPT_TYPE_HASH);
188 // Clear stack and return
189 lua_pop(L, 1);
190 assert(top == lua_gettop(L));
191 return script;
192 }
193
194 static int ScriptGetURL(lua_State* L)
195 {

Callers 1

Script_PropertyFunction · 0.70

Calls 4

lua_gettopFunction · 0.85
ToUserTypeFunction · 0.85
GetInstanceFunction · 0.50
assertFunction · 0.50

Tested by

no test coverage detected