hi,
well, i have 2 const char* and i try to load a model with it but i don’t understand what is needed.
i tryed
const char* modulePath;
const char* moduleTexturePath;
roomObject->SetModel(cache->GetResource<Model>(modulePath);
roomObject->SetMaterial(cache->GetResource<Material>(moduleTexturePath);
or
String mP(modulePath);
String mTP(moduleTexturePath);
roomObject->SetModel(cache->GetResource<Model>(mP);
roomObject->SetMaterial(cache->GetResource<Material>(mTP);
of course, my const char* aren’t empty and return the path for the model and for the material file, i verified, but it doesn’t compile so i wonder.
quote from the api :
[quote]Resource * GetResource (StringHash type, const String &name, bool sendEventOnFailure=true)
Return a resource by type and name. Load if not loaded yet. Return null if not found or if fails, unless SetReturnFailedResources(true) has been called. Can be called only from the main thread. [/quote]