Checking that material names are unique before loading them

burns

13-11-2008 22:03:58

I would really like to check material names to make sure they are unique before loading them. Is there a way to do that?

Bekas

04-12-2008 19:18:11

AFAIK, MaterialManager::getByName will return a null MaterialPtr if it doesn't already exist. You can check that way.

RichTufty

05-12-2008 09:45:32

Also how about?


bool doesMaterialExist = MaterialManager.Singleton.ResourceExists(materialName);