//** AddModel ** //Insert new model public void AddModel(int IDSubtype, int IDCloth, string prefabName) { ClothModels toAdd = new ClothModels(); toAdd.ClothID = IDCloth; toAdd.IDBodySubtype = IDSubtype; toAdd.ModelName = prefabName; clothModelsList.Add(toAdd); }
//** GetModelObjectName ** //Get the name of the prefab used by the cloth with the body subtype public string GetModelObjectName(int idCloth, int bodySubtype) { string toReturn = ""; ClothModels tRec = clothModelsList.Find(x => x.ClothID == idCloth && x.IDBodySubtype == bodySubtype); if (tRec != null) { toReturn = tRec.ModelName; } return(toReturn); }