#include "GameObjectsList.h"
#include "../core/utils/Logging.h"

std::vector<std::shared_ptr<Object>> objects;
std::string savedStateYAML;

std::vector<std::shared_ptr<Object>> pendingDeletion;



std::shared_ptr<Object> FindByTagRecursive(const std::shared_ptr<Object>& obj, const std::string& tag) {
    if (obj->GetName() == tag)
        return obj;


    for (const auto& child : obj->GetChildren()) {
        auto found = FindByTagRecursive(child, tag);
        if (found) return found;
    }

    return nullptr;
}
