You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello mates. I'm trying to introduce resource manager parts to binding. the class I want to embed in lua consists of static methods and fields.
This is my small binding:
When I call getGameObject function it doesn't see resources which I stored before.
Here, for example, m_resources is clear:
template<class ResourceType>
std::shared_ptr<ResourceType> ResourceManager::getResource(const std::string& name) {
static_assert(std::is_base_of<ResourceBase, ResourceType>::value, "this resource can't be attached due to the class isn't inherit from ResourceBase");
auto resourcesByType = m_resources.find(ResourceType::type);
if (resourcesByType != m_resources.cend()) {
auto resource = resourcesByType->second.find(name);
if (resource != resourcesByType->second.cend()) {
return resource->second.getResource<ResourceType>();
}
}
std::cerr << "Error: this resource type doesn't exist" << '\n';
return nullptr;
}
Is that due to sol just copy function signature and call it?
The text was updated successfully, but these errors were encountered:
Hello mates. I'm trying to introduce resource manager parts to binding. the class I want to embed in lua consists of static methods and fields.
This is my small binding:
When I call getGameObject function it doesn't see resources which I stored before.
Here, for example, m_resources is clear:
Is that due to sol just copy function signature and call it?
The text was updated successfully, but these errors were encountered: