MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / removeGameObject

Method removeGameObject

src/Core/Scene/Scene.cpp:532–540  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530 }
531
532 void Scene::removeGameObject(const std::string& id)
533 {
534 m_gameObjectArray.erase(
535 std::remove_if(m_gameObjectArray.begin(), m_gameObjectArray.end(),
536 [&id](const std::unique_ptr<Script::GameObject>& ptr) {
537 return (ptr->getId() == id);
538 }),
539 m_gameObjectArray.end());
540 }
541
542 std::vector<Script::GameObject*> Scene::getAllGameObjects(
543 const std::string& objectType)

Callers

nothing calls this directly

Calls 4

getIdMethod · 0.80
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected