public List <ModelInstance> AddObj(int id, Transform location) { var models = InterrootLoader.LoadModelObj(id); var returnedModelInstances = new List <ModelInstance>(); for (int i = 0; i < models.Count; i++) { var m = new ModelInstance($"o{id:D4}{(i > 0 ? $"[{i + 1}]" : "")}", models[i], location, -1, -1, -1, -1); AddModelInstance(m); returnedModelInstances.Add(m); } GFX.ModelDrawer.RequestTextureLoad(); return(returnedModelInstances); }
public List <Model> AddObj(int id, Transform location) { var models = InterrootLoader.LoadModelObj(id); var returnedModelInstances = new List <Model>(); for (int i = 0; i < models.Count; i++) { if (InterrootLoader.Type == InterrootLoader.InterrootType.InterrootDS3) { AddModelInstance(models[i], $"o{id:D6}{(i > 0 ? $"[{i + 1}]" : "")}", location); } else { AddModelInstance(models[i], $"o{id:D4}{(i > 0 ? $"[{i + 1}]" : "")}", location); } returnedModelInstances.Add(models[i]); } GFX.ModelDrawer.RequestTextureLoad(); return(returnedModelInstances); }