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

Function SetInstance

engine/script/src/script.cpp:711–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

709 }
710
711 void SetInstance(lua_State* L)
712 {
713 // [-1] instance
714
715 lua_pushinteger(L, (lua_Integer)INSTANCE_NAME_HASH);
716 // [-1] name_hash
717 // [-2] instance
718
719 lua_insert(L, -2);
720 // [-1] instance
721 // [-2] name_hash
722
723 lua_settable(L, LUA_GLOBALSINDEX);
724 }
725
726 bool IsInstanceValid(lua_State* L)
727 {

Callers 15

LoadScriptFunction · 0.85
NewScriptInstanceFunction · 0.85
DeleteScriptInstanceFunction · 0.85
RunScriptFunction · 0.85
HandleUnrefMessageFunction · 0.85
HandleMessageFunction · 0.85
CompScriptOnInputFunction · 0.85
CompScriptOnReloadFunction · 0.85
CompScriptSetPropertiesFunction · 0.85
RetrieveVarFromScriptFunction · 0.85
CompScriptSetPropertyFunction · 0.85
TEST_FFunction · 0.85

Calls 3

lua_pushintegerFunction · 0.85
lua_insertFunction · 0.85
lua_settableFunction · 0.85

Tested by 12

TEST_FFunction · 0.68
PushUserTypeFunction · 0.68
PopUserTypeFunction · 0.68
TEST_FFunction · 0.68
CreateAndPushInstanceFunction · 0.68
SetUpMethod · 0.68
TearDownMethod · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
TEST_FFunction · 0.68
SetUpMethod · 0.68
TearDownMethod · 0.68