Dawn/src/dawn/asset/loader/scene/SceneLoadContext.cpp

18 lines
466 B
C++

// Copyright (c) 2024 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "SceneLoadContext.hpp"
using namespace Dawn;
std::shared_ptr<SceneItem> SceneLoadContext::getItem(const std::string &j) {
auto it = items.find(j);
if(it == items.end()) {
auto parent = this->parent.lock();
assertNotNull(parent, "Couldn't find item.");
return parent->getItem(j);
}
return it->second;
}