using UnityEngine;
using System.Collections.Generic;
using System.Linq;
public class DataManager : UnitySingleton<DataManager>
{
    List<SimulationModel> models = new List<SimulationModel>();
    public void AddModel(SimulationModel model)
    {
        if (models.Any(x => x == model))
            return; 
        int objCount = models.FindAll(x => x.modelName.Contains(model.modelName)).Count;
        model.modelName = model.modelName + "_" + objCount.ToString(); 
        models.Add(model);
    }
    public void RemoveModel(SimulationModel model)
    {
        if (models.Any(x => x == model))
            return;
        models.Remove(model);
    }
}
