12#ifndef FOOLSENGINE_SIMPLEECSRESOURCECOMPONENTEXT_H
13#define FOOLSENGINE_SIMPLEECSRESOURCECOMPONENTEXT_H
16#include <nlohmann/json.hpp>
33 template <
typename TResource>
35 typename std::enable_if<std::is_base_of<
45 static std::shared_ptr<TResource>
get(
const nlohmann::json& jsonResource) {
47 jsonResource.at(
"resourceName")
static std::shared_ptr< TResource > GetRegisteredResource(const std::string &resourceName)
Gets a reference to or constructs a Resource by name whose description has been stored in this Resour...
Definition resource_database.hpp:521
ToyMaker Engine's implementation of an ECS system.
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition camera_system.hpp:20
Headers relating to resources and their management for a given project.
static std::shared_ptr< TResource > get(const nlohmann::json &jsonResource)
Helper function which constructs or fetches a reference to a resource defined in the Resource Databas...
Definition ecs_world_resource_ext.hpp:45
A struct that describes how a JSON component description is turned into a component.
Definition ecs_world.hpp:289