Trying to make a component system similar to Unity's component system. I am facing a LNK2019 error whenever I call the following function:
template<typename T>
std::weak_ptr<T> aze::GameObject::AddComponent()
{
std::is_base_of<Component, T> isBased{};
assert(isBased.value && "Not a component.");
auto pT = std::make_shared<T>();
auto pComponent = std::weak_ptr<T>(pT);
m_pComponents.push_back(std::move(pT));
return pComponent;
}
Since LNK2019 errors are often really broad it is a pain in the ass to find them. Now, I feel like I can't find it because it is a templated function and I am not familiar with solving templated errors.
Anywhere to look on what the cause of the issue could be?