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

Function CompScriptNewWorld

engine/gameobject/src/gameobject/comp_script.cpp:40–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38namespace dmGameObject
39{
40 CreateResult CompScriptNewWorld(const ComponentNewWorldParams& params)
41 {
42 if (params.m_World != 0x0)
43 {
44 uint32_t component_count = dmMath::Min(params.m_MaxComponentInstances, params.m_MaxInstances);
45 CompScriptWorld* w = new CompScriptWorld(component_count);
46 w->m_ScriptWorld = dmScript::NewScriptWorld((dmScript::HContext)params.m_Context);
47 *params.m_World = w;
48
49 return CREATE_RESULT_OK;
50 }
51 else
52 {
53 return CREATE_RESULT_UNKNOWN_ERROR;
54 }
55 }
56
57 CreateResult CompScriptDeleteWorld(const ComponentDeleteWorldParams& params)
58 {

Callers

nothing calls this directly

Calls 2

MinFunction · 0.85
NewScriptWorldFunction · 0.85

Tested by

no test coverage detected