capelenglish
I have several games. Each game has different model (.mdl) files associated with it. In order to keep the projects organized, I want to create a folder under the source folder called Models and put all my .mdl files there. However, the following doesn’t work:
ResourceCache* cache = GetSubsystem<ResourceCache>();
cache->AddResourceDir("/home/user/projectname/source/Models");
tableObject->SetModel(cache->GetResource<Model>("Models/post2.mdl"));
I tried using a relative path (./Models) and that didn’t work either. What am I doing wrong?